From 13db1e484b4d5bd10e9ffa2b2c5f615fe4bcfebb Mon Sep 17 00:00:00 2001 From: Alexander Brown Date: Thu, 9 Oct 2025 13:28:38 -0700 Subject: [PATCH] CI: Add concurrency checks to PR workflows (#6000) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow ## Changes - **What**: Will cancel ongoing checks when new commits are pushed to the PR branch ## Review Focus What other optimizations could we make? ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6000-CI-Add-concurrency-checks-to-PR-workflows-2876d73d3650813cbb65eb8c397ac748) by [Unito](https://www.unito.io) --- .github/workflows/claude-pr-review.yml | 4 ++++ .github/workflows/lint-and-format.yaml | 4 ++++ .github/workflows/tests-ci.yaml | 6 +++++- .github/workflows/update-playwright-expectations.yaml | 3 ++- .github/workflows/vitest-tests.yaml | 4 ++++ 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/claude-pr-review.yml b/.github/workflows/claude-pr-review.yml index 293d3ad2b..76a9eb0f3 100644 --- a/.github/workflows/claude-pr-review.yml +++ b/.github/workflows/claude-pr-review.yml @@ -11,6 +11,10 @@ on: pull_request: types: [labeled] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: wait-for-ci: runs-on: ubuntu-latest diff --git a/.github/workflows/lint-and-format.yaml b/.github/workflows/lint-and-format.yaml index 1f20ab92e..62956cadb 100644 --- a/.github/workflows/lint-and-format.yaml +++ b/.github/workflows/lint-and-format.yaml @@ -4,6 +4,10 @@ on: pull_request: branches-ignore: [wip/*, draft/*, temp/*] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: contents: write pull-requests: write diff --git a/.github/workflows/tests-ci.yaml b/.github/workflows/tests-ci.yaml index 3cd9e1c6b..0d33ecf19 100644 --- a/.github/workflows/tests-ci.yaml +++ b/.github/workflows/tests-ci.yaml @@ -7,6 +7,10 @@ on: branches-ignore: [wip/*, draft/*, temp/*, vue-nodes-migration, sno-playwright-*] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: setup: runs-on: ubuntu-latest @@ -22,7 +26,7 @@ jobs: - name: Setup frontend uses: ./.github/actions/setup-frontend with: - include_build_step: 'true' + include_build_step: true - name: Setup Playwright uses: ./.github/actions/setup-playwright # Setup Playwright and cache browsers diff --git a/.github/workflows/update-playwright-expectations.yaml b/.github/workflows/update-playwright-expectations.yaml index 229408742..981038d9f 100644 --- a/.github/workflows/update-playwright-expectations.yaml +++ b/.github/workflows/update-playwright-expectations.yaml @@ -8,7 +8,8 @@ on: types: [created] concurrency: - group: ${{ github.event.number || github.event.issue.number }} + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: test: diff --git a/.github/workflows/vitest-tests.yaml b/.github/workflows/vitest-tests.yaml index 46155d912..394145188 100644 --- a/.github/workflows/vitest-tests.yaml +++ b/.github/workflows/vitest-tests.yaml @@ -6,6 +6,10 @@ on: pull_request: branches-ignore: [wip/*, draft/*, temp/*] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: runs-on: ubuntu-latest