Skip to content

Commit 9ad5e70

Browse files
authored
CI - Cancel runs on new pushes (#3501)
# Description of Changes Add `cancel-in-progress` to our GitHub workflows. # API and ABI breaking changes None # Expected complexity level and risk 1 # Testing - [x] Pushing new commits to this PR causes cancels of previous CI runs --------- Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
1 parent a952ba5 commit 9ad5e70

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ on:
1313

1414
name: CI
1515

16+
concurrency:
17+
# When a PR number isn't available, the event won't be a `pull_request` event so it won't matter.
18+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
19+
# Only cancel when the event is a pull_request
20+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
21+
1622
jobs:
1723
docker_smoketests:
1824
name: Smoketests

.github/workflows/csharp-test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
- master
77
pull_request:
88

9+
concurrency:
10+
# When a PR number isn't available, the event won't be a `pull_request` event so it won't matter.
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
12+
# Only cancel when the event is a pull_request
13+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
14+
915
jobs:
1016
unity-testsuite:
1117
runs-on: spacetimedb-runner

.github/workflows/internal-tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ name: Internal Tests
99
permissions:
1010
contents: read
1111

12+
concurrency:
13+
# When a PR number isn't available, the event won't be a `pull_request` event so it won't matter.
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
15+
# Only cancel when the event is a pull_request
16+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
17+
1218
jobs:
1319
run-tests:
1420
runs-on: ubuntu-latest

.github/workflows/typescript-test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
pull_request:
88
merge_group:
99

10+
concurrency:
11+
# When a PR number isn't available, the event won't be a `pull_request` event so it won't matter.
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
13+
# Only cancel when the event is a pull_request
14+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15+
1016
jobs:
1117
build-and-test:
1218
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)