Skip to content

Commit 3c074c1

Browse files
committed
refactor(ci): switch to modern built-in concurrency control for workflows
cancel workflow action was the best available at the time, but modern built-in is better when it fits our use cases, which it does here
1 parent 5d60088 commit 3c074c1

File tree

6 files changed

+25
-28
lines changed

6 files changed

+25
-28
lines changed

.github/workflows/create_test_patches.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ on:
1919
- '.spellcheck.dict.txt'
2020
- '**/*.md'
2121

22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
2226
jobs:
2327
main:
2428
name: Create patch-package Patches
2529
runs-on: ubuntu-latest
2630
steps:
27-
- uses: styfle/[email protected]
28-
with:
29-
all_but_latest: true
30-
3131
- uses: actions/checkout@v3
3232

3333
# Future ideas:

.github/workflows/docs.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ on:
99
branches:
1010
- '**'
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
spelling:
1418
name: 'Spelling & Grammar'
1519
runs-on: ubuntu-latest
1620
steps:
17-
- uses: styfle/[email protected]
18-
with:
19-
all_but_latest: true
2021
- uses: actions/checkout@v3
2122
with:
2223
fetch-depth: 1

.github/workflows/linting.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ on:
99
- main
1010
- v14-release
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
linting:
1418
name: Lint
1519
timeout-minutes: 15
1620
runs-on: ubuntu-latest
1721
steps:
18-
- uses: styfle/[email protected]
19-
with:
20-
all_but_latest: true
2122
- uses: actions/checkout@v3
2223
with:
2324
fetch-depth: 1
@@ -59,9 +60,6 @@ jobs:
5960
runs-on: ubuntu-latest
6061
timeout-minutes: 15
6162
steps:
62-
- uses: styfle/[email protected]
63-
with:
64-
all_but_latest: true
6563
- uses: actions/checkout@v3
6664
with:
6765
fetch-depth: 1
@@ -93,9 +91,6 @@ jobs:
9391
runs-on: ubuntu-latest
9492
timeout-minutes: 15
9593
steps:
96-
- uses: styfle/[email protected]
97-
with:
98-
all_but_latest: true
9994
- uses: actions/checkout@v3
10095
with:
10196
fetch-depth: 1

.github/workflows/tests_e2e_android.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
- '.spellcheck.dict.txt'
2121
- '**/*.md'
2222

23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.ref }}
25+
cancel-in-progress: true
26+
2327
jobs:
2428
android:
2529
name: Android
@@ -41,10 +45,6 @@ jobs:
4145
EMULATOR_COMMAND: "-avd TestingAVD -noaudio -gpu swiftshader_indirect -camera-back none -no-snapshot -no-window -no-boot-anim -nojni -memory 2048 -timezone 'Europe/London' -cores 2"
4246
EMULATOR_EXECUTABLE: qemu-system-x86_64-headless
4347
steps:
44-
- uses: styfle/[email protected]
45-
with:
46-
all_but_latest: true
47-
4848
- uses: actions/checkout@v3
4949
with:
5050
fetch-depth: 50

.github/workflows/tests_e2e_ios.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
- '.spellcheck.dict.txt'
2121
- '**/*.md'
2222

23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.ref }}
25+
cancel-in-progress: true
26+
2327
jobs:
2428
ios:
2529
name: iOS
@@ -29,10 +33,6 @@ jobs:
2933
env:
3034
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3135
steps:
32-
- uses: styfle/[email protected]
33-
with:
34-
all_but_latest: true
35-
3636
# Set up tool versions
3737
- uses: actions/setup-node@v3
3838
with:

.github/workflows/tests_jest.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
- '.spellcheck.dict.txt'
2020
- '**/*.md'
2121

22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
2226
jobs:
2327
jest:
2428
name: Jest
@@ -27,9 +31,6 @@ jobs:
2731
env:
2832
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2933
steps:
30-
- uses: styfle/[email protected]
31-
with:
32-
all_but_latest: true
3334
- uses: actions/checkout@v3
3435
with:
3536
fetch-depth: 50
@@ -57,4 +58,4 @@ jobs:
5758
run: yarn tests:jest-coverage
5859
- uses: codecov/codecov-action@v3
5960
with:
60-
verbose: true
61+
verbose: true

0 commit comments

Comments
 (0)