From 59fe24d1d4453250809b39758e64635e6b460b31 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 13:26:37 +0000 Subject: [PATCH 01/14] update e2e and unit test to cancel superseded PR runs --- .github/workflows/e2e.yml | 6 ++++++ .github/workflows/test.yml | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 58a339a9b7..a1f7df8ae8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -3,6 +3,12 @@ on: workflow_dispatch: pull_request: branches: [develop] + +# Cancel superseded PR runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: test-e2e: environment: e2e-tests diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8067f31487..dcdd25bef1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,11 @@ on: - develop - release +# Cancel superseded PR runs; let develop/release runs finish since they trigger deploys +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: test: name: Test and lint code base From 2ac28ffabb117071549b9a74d3cb8f808cf045cc Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 13:31:10 +0000 Subject: [PATCH 02/14] bump actions/checkout and actions/setup-node to v4 --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dcdd25bef1..5c3715d0d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,9 +17,9 @@ jobs: name: Test and lint code base runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: '18.20.x' - run: npm install From 753daf21b6f18525344126ace5c5d94b6dcd3843 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 13:41:52 +0000 Subject: [PATCH 03/14] update deploy.yml to check that 'Test' was success, instead of any completion --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 08e8f4ffe5..7d40755244 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,6 +14,7 @@ env: IMAGE: ${{ secrets.DOCKER_USERNAME }}/p5.js-web-editor jobs: push_to_registry: + if: ${{ github.event.workflow_run.conclusion == 'success' }} environment: production name: Push Docker image to Docker Hub runs-on: ubuntu-latest From f16e099da544de59f02588e5e150806f193934d7 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 13:44:25 +0000 Subject: [PATCH 04/14] make sure deploys and staging-deploys run one at a time --- .github/workflows/deploy-staging.yml | 4 ++++ .github/workflows/deploy.yml | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 508a69e0d6..e06e183bd7 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -6,6 +6,10 @@ on: - develop types: - completed +# Run staging deploys one at a time +concurrency: + group: deploy-staging + cancel-in-progress: false env: PROJECT_ID: ${{ secrets.GKE_PROJECT }} GKE_CLUSTER: p5-gke-cluster diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7d40755244..4ee57c7c00 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,6 +6,10 @@ on: - release types: - completed +# Run production deploys one at a time +concurrency: + group: deploy-production + cancel-in-progress: false env: PROJECT_ID: ${{ secrets.GKE_PROJECT }} GKE_CLUSTER: p5-gke-cluster @@ -48,7 +52,7 @@ jobs: with: service_account_key: ${{ secrets.GKE_SA_KEY }} project_id: ${{ secrets.GKE_PROJECT }} - + # Configure docker to use the gcloud command-line tool as a credential helper - run: |- gcloud --quiet auth configure-docker From 773bd294103fd94ab0a61cabc3ed6a7bd8280eae Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 14:09:49 +0000 Subject: [PATCH 05/14] cache npm install and swap to npm ci --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c3715d0d3..0576bfe9d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18.20.x' - - run: npm install + cache: 'npm' + - run: npm ci - run: npm run test - run: npm run typecheck - run: npm run lint From 6f4de362c22b7b7d81dd715f53964d0cb4799c2f Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 14:22:33 +0000 Subject: [PATCH 06/14] address feedback: put deploy-production and deploy-staging into buckets based on workflow run conclusion for skipping tests that were not successful --- .github/workflows/deploy-staging.yml | 2 +- .github/workflows/deploy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index e06e183bd7..b6e665271d 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -8,7 +8,7 @@ on: - completed # Run staging deploys one at a time concurrency: - group: deploy-staging + group: deploy-staging-${{ github.event.workflow_run.conclusion }} cancel-in-progress: false env: PROJECT_ID: ${{ secrets.GKE_PROJECT }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4ee57c7c00..443dc1f351 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,7 +8,7 @@ on: - completed # Run production deploys one at a time concurrency: - group: deploy-production + group: deploy-production-${{ github.event.workflow_run.conclusion }} cancel-in-progress: false env: PROJECT_ID: ${{ secrets.GKE_PROJECT }} From 8e36e71b604615b59b40440a0c90cc26f71eeb88 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 14:29:14 +0000 Subject: [PATCH 07/14] address feedback: use github.run_id to not cancel pushes to develop and release --- .github/workflows/e2e.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a1f7df8ae8..13e6ccf347 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -6,7 +6,7 @@ on: # Cancel superseded PR runs concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0576bfe9d2..274a5a3614 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ on: # Cancel superseded PR runs; let develop/release runs finish since they trigger deploys concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: From 375d8c0a8141f52a088a5568bd83fbf2ceb51e77 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 13:26:37 +0000 Subject: [PATCH 08/14] update e2e and unit test to cancel superseded PR runs --- .github/workflows/e2e.yml | 6 ++++++ .github/workflows/test.yml | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 58a339a9b7..a1f7df8ae8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -3,6 +3,12 @@ on: workflow_dispatch: pull_request: branches: [develop] + +# Cancel superseded PR runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: test-e2e: environment: e2e-tests diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8067f31487..dcdd25bef1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,11 @@ on: - develop - release +# Cancel superseded PR runs; let develop/release runs finish since they trigger deploys +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: test: name: Test and lint code base From c6a363a407e6ad9a723470366a4086215f328812 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 13:31:10 +0000 Subject: [PATCH 09/14] bump actions/checkout and actions/setup-node to v4 --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dcdd25bef1..5c3715d0d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,9 +17,9 @@ jobs: name: Test and lint code base runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: '18.20.x' - run: npm install From ec9527c4557d3e1561f10b44bf3f66238c2cda21 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 13:41:52 +0000 Subject: [PATCH 10/14] update deploy.yml to check that 'Test' was success, instead of any completion --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 08e8f4ffe5..7d40755244 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,6 +14,7 @@ env: IMAGE: ${{ secrets.DOCKER_USERNAME }}/p5.js-web-editor jobs: push_to_registry: + if: ${{ github.event.workflow_run.conclusion == 'success' }} environment: production name: Push Docker image to Docker Hub runs-on: ubuntu-latest From 56ff5898a521d2a102481b31ff4d496ac3244e6d Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 13:44:25 +0000 Subject: [PATCH 11/14] make sure deploys and staging-deploys run one at a time --- .github/workflows/deploy-staging.yml | 4 ++++ .github/workflows/deploy.yml | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 508a69e0d6..e06e183bd7 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -6,6 +6,10 @@ on: - develop types: - completed +# Run staging deploys one at a time +concurrency: + group: deploy-staging + cancel-in-progress: false env: PROJECT_ID: ${{ secrets.GKE_PROJECT }} GKE_CLUSTER: p5-gke-cluster diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7d40755244..4ee57c7c00 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,6 +6,10 @@ on: - release types: - completed +# Run production deploys one at a time +concurrency: + group: deploy-production + cancel-in-progress: false env: PROJECT_ID: ${{ secrets.GKE_PROJECT }} GKE_CLUSTER: p5-gke-cluster @@ -48,7 +52,7 @@ jobs: with: service_account_key: ${{ secrets.GKE_SA_KEY }} project_id: ${{ secrets.GKE_PROJECT }} - + # Configure docker to use the gcloud command-line tool as a credential helper - run: |- gcloud --quiet auth configure-docker From e502c08602e45422c684fd68dcb0c22de9633cfc Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 14:09:49 +0000 Subject: [PATCH 12/14] cache npm install and swap to npm ci --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c3715d0d3..0576bfe9d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18.20.x' - - run: npm install + cache: 'npm' + - run: npm ci - run: npm run test - run: npm run typecheck - run: npm run lint From abd550fcde34735f73c59cf396fe234201c5b2b2 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 14:22:33 +0000 Subject: [PATCH 13/14] address feedback: put deploy-production and deploy-staging into buckets based on workflow run conclusion for skipping tests that were not successful --- .github/workflows/deploy-staging.yml | 2 +- .github/workflows/deploy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index e06e183bd7..b6e665271d 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -8,7 +8,7 @@ on: - completed # Run staging deploys one at a time concurrency: - group: deploy-staging + group: deploy-staging-${{ github.event.workflow_run.conclusion }} cancel-in-progress: false env: PROJECT_ID: ${{ secrets.GKE_PROJECT }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4ee57c7c00..443dc1f351 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,7 +8,7 @@ on: - completed # Run production deploys one at a time concurrency: - group: deploy-production + group: deploy-production-${{ github.event.workflow_run.conclusion }} cancel-in-progress: false env: PROJECT_ID: ${{ secrets.GKE_PROJECT }} From c71980d6ccc32766439408852897919a08b873ec Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Wed, 28 Oct 2026 14:29:14 +0000 Subject: [PATCH 14/14] address feedback: use github.run_id to not cancel pushes to develop and release --- .github/workflows/e2e.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a1f7df8ae8..13e6ccf347 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -6,7 +6,7 @@ on: # Cancel superseded PR runs concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0576bfe9d2..274a5a3614 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ on: # Cancel superseded PR runs; let develop/release runs finish since they trigger deploys concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: