Skip to content

Commit

Permalink
refactor(ci): switch to modern built-in concurrency control for workf…
Browse files Browse the repository at this point in the history
…lows

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
  • Loading branch information
mikehardy committed Oct 30, 2022
1 parent 5d60088 commit 3c074c1
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 28 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/create_test_patches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ on:
- '.spellcheck.dict.txt'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
main:
name: Create patch-package Patches
runs-on: ubuntu-latest
steps:
- uses: styfle/[email protected]
with:
all_but_latest: true

- uses: actions/checkout@v3

# Future ideas:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ on:
branches:
- '**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
spelling:
name: 'Spelling & Grammar'
runs-on: ubuntu-latest
steps:
- uses: styfle/[email protected]
with:
all_but_latest: true
- uses: actions/checkout@v3
with:
fetch-depth: 1
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ on:
- main
- v14-release

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
linting:
name: Lint
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: styfle/[email protected]
with:
all_but_latest: true
- uses: actions/checkout@v3
with:
fetch-depth: 1
Expand Down Expand Up @@ -59,9 +60,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: styfle/[email protected]
with:
all_but_latest: true
- uses: actions/checkout@v3
with:
fetch-depth: 1
Expand Down Expand Up @@ -93,9 +91,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: styfle/[email protected]
with:
all_but_latest: true
- uses: actions/checkout@v3
with:
fetch-depth: 1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests_e2e_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
- '.spellcheck.dict.txt'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
android:
name: Android
Expand All @@ -41,10 +45,6 @@ jobs:
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"
EMULATOR_EXECUTABLE: qemu-system-x86_64-headless
steps:
- uses: styfle/[email protected]
with:
all_but_latest: true

- uses: actions/checkout@v3
with:
fetch-depth: 50
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests_e2e_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
- '.spellcheck.dict.txt'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ios:
name: iOS
Expand All @@ -29,10 +33,6 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: styfle/[email protected]
with:
all_but_latest: true

# Set up tool versions
- uses: actions/setup-node@v3
with:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/tests_jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
- '.spellcheck.dict.txt'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
jest:
name: Jest
Expand All @@ -27,9 +31,6 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: styfle/[email protected]
with:
all_but_latest: true
- uses: actions/checkout@v3
with:
fetch-depth: 50
Expand Down Expand Up @@ -57,4 +58,4 @@ jobs:
run: yarn tests:jest-coverage
- uses: codecov/codecov-action@v3
with:
verbose: true
verbose: true

0 comments on commit 3c074c1

Please sign in to comment.