Skip to content

Commit 71ca04c

Browse files
ci: add concurrency groups to cancel superseded PR runs (#182)
A new push to a PR branch now cancels the in-progress run for that ref across the seven test-* workflows (pull_request events only; main pushes always finish). Frees runner slots and speeds feedback.
1 parent 7dbfe30 commit 71ca04c

7 files changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/test-breaking.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
push:
44
branches: [main]
55
pull_request:
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
9+
610
jobs:
711
oasdiff_breaking:
812
runs-on: ubuntu-latest

.github/workflows/test-changelog.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
push:
44
branches: [main]
55
pull_request:
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
9+
610
jobs:
711
oasdiff_changelog:
812
runs-on: ubuntu-latest

.github/workflows/test-diff.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
push:
44
branches: [main]
55
pull_request:
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
9+
610
jobs:
711
oasdiff_diff:
812
runs-on: ubuntu-latest

.github/workflows/test-error-annotation.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
push:
44
branches: [main]
55
pull_request:
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
9+
610
jobs:
711
entrypoint_error_annotation:
812
runs-on: ubuntu-latest

.github/workflows/test-pr-comment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
push:
44
branches: [main]
55
pull_request:
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
9+
610
jobs:
711
pr_comment_tolerates_oasdiff_fail_on:
812
runs-on: ubuntu-latest

.github/workflows/test-validate.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
push:
44
branches: [main]
55
pull_request:
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
9+
610
jobs:
711
oasdiff_validate_valid:
812
runs-on: ubuntu-latest

.github/workflows/test-verify.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
branches: [main]
55
pull_request:
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
10+
711
jobs:
812
verify_all_green:
913
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)