From 01eec6bb49a70733aac6b3c4edea90d19424e9af Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Thu, 28 Sep 2023 06:50:05 +1000 Subject: [PATCH 1/7] Create PULL_REQUEST_TEMPLATE.md Add standard PR template, linking to this repo. --- .github/PULL_REQUEST_TEMPLATE.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..fd163b9a26 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,3 @@ +Fixes # + +I confirm I have read the [contributing guidelines](https://github.com/playcanvas/developer.playcanvas.com/blob/master/.github/CONTRIBUTING.md) and signed the [Contributor License Agreement](https://docs.google.com/a/playcanvas.com/forms/d/1Ih69zQfJG-QDLIEpHr6CsaAs6fPORNOVnMv5nuo0cjk/viewform). From d164df57fe39cb50ee4d9b242a134d5c5a81982b Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Thu, 28 Sep 2023 06:53:22 +1000 Subject: [PATCH 2/7] Update ci.yml Drop unsupported node 16 from CI build matrix. --- .github/workflows/ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97504f4498..11602e4465 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,18 +13,21 @@ jobs: strategy: matrix: - node-version: [16.x, 18.x, 20.x] + node-version: [18.x, 20.x] steps: - name: Checkout repo uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: 'npm' + - name: Install dependencies run: npm ci + - name: Build Site run: npm run build @@ -34,18 +37,21 @@ jobs: strategy: matrix: - node-version: [16.x, 18.x, 20.x] + node-version: [18.x, 20.x] steps: - name: Checkout repo uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: 'npm' + - name: Install dependencies run: npm ci + - name: Lint JavaScript run: npm run lint @@ -53,16 +59,21 @@ jobs: name: Lint HTML runs-on: ubuntu-latest steps: + - name: Checkout repo uses: actions/checkout@v3 + - name: Setup Node.js 18.x uses: actions/setup-node@v3 with: node-version: 18.x cache: 'npm' + - name: Install dependencies run: npm ci + - name: Build run: npm run build + - name: Lint HTML run: npm run lint:html From 213d9ca07d93573ef67e1330908c2c6d805972d6 Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Thu, 28 Sep 2023 06:54:58 +1000 Subject: [PATCH 3/7] Update ci.yml Add sensible timeouts --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11602e4465..c36050022d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ jobs: build: name: Build runs-on: ubuntu-latest + timeout-minutes: 10 strategy: matrix: @@ -34,6 +35,7 @@ jobs: lint: name: Lint runs-on: ubuntu-latest + timeout-minutes: 10 strategy: matrix: @@ -58,8 +60,9 @@ jobs: lint-html: name: Lint HTML runs-on: ubuntu-latest + timeout-minutes: 10 + steps: - - name: Checkout repo uses: actions/checkout@v3 From f8d7dfc978f3f92ce5e05f93e710a74909f84003 Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Thu, 28 Sep 2023 06:56:47 +1000 Subject: [PATCH 4/7] Update ci.yml Add concurrency (early exit) and permissions settings --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c36050022d..f08874a28b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,13 @@ on: pull_request: branches: [ dev ] +concurrency: + group: ci-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: read + jobs: build: name: Build From 3e35363e982ffb33706c88a0f7f3aa401135b5af Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Thu, 28 Sep 2023 06:58:03 +1000 Subject: [PATCH 5/7] Update ci.yml optimise "clean install" command, for speed and log clarity. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f08874a28b..54843cc695 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: cache: 'npm' - name: Install dependencies - run: npm ci + run: npm clean-install --progress=false --no-fund - name: Build Site run: npm run build @@ -59,7 +59,7 @@ jobs: cache: 'npm' - name: Install dependencies - run: npm ci + run: npm clean-install --progress=false --no-fund - name: Lint JavaScript run: npm run lint @@ -80,7 +80,7 @@ jobs: cache: 'npm' - name: Install dependencies - run: npm ci + run: npm clean-install --progress=false --no-fund - name: Build run: npm run build From d9c1ba211a941c034bc62f50f940a96d43c5dc38 Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Thu, 28 Sep 2023 06:59:04 +1000 Subject: [PATCH 6/7] Update ci.yml upgrade checkout action to v4 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54843cc695..d010d55ec9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 @@ -50,7 +50,7 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 @@ -71,7 +71,7 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js 18.x uses: actions/setup-node@v3 From 7c946e02d42e9c6c2b289c427daaf82f68d16fe6 Mon Sep 17 00:00:00 2001 From: Ed Preston Date: Thu, 28 Sep 2023 07:00:36 +1000 Subject: [PATCH 7/7] Update ci.yml allow repository owners to manually re-run CI --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d010d55ec9..1a8c681001 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,7 @@ name: CI on: + workflow_dispatch: push: branches: [ dev ] pull_request: