Skip to content

Commit 2a0c3ef

Browse files
authored
build: automatically cancel old tests/build on new push #1545 (#772)
Currently, whenever you push any commit to your branch, the old builds are still running and a new build is started. Once a new commit is added, the old test results no longer matter and it's just a waste of CI resources. Also reduces confusion with multiple builds running in parallel for the same branch/possibly blocking any merges. With this little change, we ensure that whenever a new commit is added, the previous build is immediately canceled/stopped and only the build (latest commit) runs.
1 parent 4155c4c commit 2a0c3ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
permissions:
1111
contents: read
1212

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
1317
jobs:
1418
test:
1519
name: Test / OS ${{ matrix.platform }} / Node ${{ matrix.node }}

0 commit comments

Comments
 (0)