Skip to content

Commit eba40ed

Browse files
trsvchnvfdev-5
andauthored
Add concurrency to cancel in-progress workflows for testing (#2371)
* Add concurrency to cancel in-progress workflows * Update hvd-tests.yml * Update hvd-tests.yml Co-authored-by: vfdev <vfdev.5@gmail.com>
1 parent 94bf2da commit eba40ed

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

.github/workflows/hvd-tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
- "tests/run_cpu_tests.sh"
1414
- ".github/workflows/hvd-tests.yml"
1515

16+
concurrency:
17+
# <workflow_name>-<branch_name>-<true || commit_sha (if branch is protected)>
18+
group: hvd-tests-${{ github.ref_name }}-${{ !(github.ref_protected) || github.sha }}
19+
cancel-in-progress: true
20+
1621
jobs:
1722
horovod-tests:
1823
runs-on: ubuntu-latest

.github/workflows/tpu-tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
- "tests/run_tpu_tests.sh"
1414
- ".github/workflows/tpu-tests.yml"
1515

16+
concurrency:
17+
# <workflow_name>-<branch_name>-<true || commit_sha (if branch is protected)>
18+
group: tpu-tests-${{ github.ref_name }}-${{ !(github.ref_protected) || github.sha }}
19+
cancel-in-progress: true
20+
1621
jobs:
1722
tpu-tests:
1823
runs-on: ubuntu-latest

.github/workflows/unit-tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ on:
2020
- "requirements-dev.txt"
2121
- ".github/workflows/unit-tests.yml"
2222

23+
concurrency:
24+
# <workflow_name>-<branch_name>-<true || commit_sha (if branch is protected)>
25+
group: unit-tests-${{ github.ref_name }}-${{ !(github.ref_protected) || github.sha }}
26+
cancel-in-progress: true
27+
2328
jobs:
2429
build:
2530
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)