Skip to content

Commit 78d3bb9

Browse files
authored
Don't limit CI concurrency on main (#6807)
The CI workflow used a blanket `cancel-in-progress: true`, which makes sense for PR runs (collapse to the latest commit) but means pushes to `main` cancel each other when several PRs merge in quick succession. There is no shared state between CI runs that would justify either cancelling or serializing them — each run is independent — and we'd rather see every commit on `main` get a full check. Make the concurrency group unique per `run_id` for non-PR events so pushes to `main` neither cancel nor queue, while PRs keep the existing cancel-on-new-push behavior through the shared per-ref group.
1 parent 39f8a3d commit 78d3bb9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ env:
1313
MYPY_CACHE_VERSION: 1
1414

1515
concurrency:
16-
group: "${{ github.workflow }}-${{ github.ref }}"
17-
cancel-in-progress: true
16+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'pull_request' && 'pr' || github.run_id }}
17+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1818

1919
jobs:
2020
# Separate job to pre-populate the base dependency cache

0 commit comments

Comments
 (0)