Skip to content

Commit bc3d8a7

Browse files
targosdanielleadams
authored andcommitted
build: cancel running CI jobs when a PR is updated
Refs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value PR-URL: #42017 Reviewed-By: Mestery <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Mary Marchini <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Akhil Marsonya <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 60d6409 commit bc3d8a7

10 files changed

+40
-0
lines changed

.github/workflows/build-tarball.yml

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ on:
2424
- .github/**
2525
- '!.github/workflows/build-tarball.yml'
2626

27+
concurrency:
28+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
29+
cancel-in-progress: true
30+
2731
env:
2832
PYTHON_VERSION: '3.10'
2933
FLAKY_TESTS: dontcare

.github/workflows/build-windows.yml

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
- .github/**
2020
- '!.github/workflows/build-windows.yml'
2121

22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
24+
cancel-in-progress: true
25+
2226
env:
2327
PYTHON_VERSION: '3.10'
2428
FLAKY_TESTS: dontcare

.github/workflows/coverage-linux.yml

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
- .github/**
2121
- '!.github/workflows/coverage-linux.yml'
2222

23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
25+
cancel-in-progress: true
26+
2327
env:
2428
PYTHON_VERSION: '3.10'
2529
FLAKY_TESTS: dontcare

.github/workflows/coverage-windows.yml

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ on:
2222
- .github/**
2323
- '!.github/workflows/coverage-windows.yml'
2424

25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
27+
cancel-in-progress: true
28+
2529
env:
2630
PYTHON_VERSION: '3.10'
2731
FLAKY_TESTS: dontcare

.github/workflows/doc.yml

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
- v[0-9]+.x-staging
1111
- v[0-9]+.x
1212

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1317
env:
1418
NODE_VERSION: lts/*
1519

.github/workflows/linters.yml

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
- v[0-9]+.x-staging
1111
- v[0-9]+.x
1212

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1317
env:
1418
PYTHON_VERSION: '3.10'
1519
NODE_VERSION: lts/*

.github/workflows/test-asan.yml

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ on:
2525
- .github/**
2626
- '!.github/workflows/test-asan.yml'
2727

28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
30+
cancel-in-progress: true
31+
2832
env:
2933
PYTHON_VERSION: '3.10'
3034
FLAKY_TESTS: dontcare

.github/workflows/test-internet.yml

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
- v[0-9]+.x
1818
paths: [test/internet/**]
1919

20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
22+
cancel-in-progress: true
23+
2024
env:
2125
PYTHON_VERSION: '3.10'
2226
FLAKY_TESTS: dontcare

.github/workflows/test-linux.yml

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
- .github/**
2020
- '!.github/workflows/test-linux.yml'
2121

22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
24+
cancel-in-progress: true
25+
2226
env:
2327
PYTHON_VERSION: '3.10'
2428
FLAKY_TESTS: dontcare

.github/workflows/test-macos.yml

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ on:
2525
- .github/**
2626
- '!.github/workflows/test-macos.yml'
2727

28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
30+
cancel-in-progress: true
31+
2832
env:
2933
PYTHON_VERSION: '3.10'
3034
FLAKY_TESTS: dontcare

0 commit comments

Comments
 (0)