Skip to content

Commit 2096516

Browse files
authored
Prevent concurrent builds per branch (#1178)
* Cancel concurrent test jobs when new push occurs
1 parent 167d610 commit 2096516

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ on:
2727
types:
2828
- 'published'
2929

30+
# Cancel any previous runs of this workflow that are still in progress.
31+
# This is to avoid running the same tests multiple times concurrently.
32+
concurrency:
33+
group: ci-${{ github.ref }}
34+
cancel-in-progress: true
35+
3036
jobs:
3137

3238
pre-commit:
@@ -38,7 +44,6 @@ jobs:
3844
python-version: '3.13'
3945
- uses: pre-commit/[email protected]
4046

41-
4247
# run unit (and integration tests if account secrets available) on our build matrix
4348
test:
4449
needs: [pre-commit]

0 commit comments

Comments
 (0)