Skip to content

Commit

Permalink
chore(ci): switch workflows to built-in concurrency control
Browse files Browse the repository at this point in the history
github did not used to have it, so cancel workflow action was needed, not anymore
  • Loading branch information
mikehardy committed Apr 27, 2022
1 parent 3965615 commit 2db1b92
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 23 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ on:
branches:
- '**'

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

jobs:
spelling:
name: 'Spelling & Grammar & Markdown'
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.9.1
with:
all_but_latest: true
- uses: actions/checkout@v2
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 @@ -8,15 +8,16 @@ on:
branches:
- main

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

jobs:
linting:
name: Lint code
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.9.1
with:
all_but_latest: true
- uses: actions/checkout@v2
with:
fetch-depth: 1
Expand Down Expand Up @@ -63,9 +64,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: styfle/cancel-workflow-action@0.9.1
with:
all_but_latest: true
- uses: actions/checkout@v2
with:
fetch-depth: 1
Expand Down Expand Up @@ -98,9 +96,6 @@ jobs:
# runs-on: ubuntu-latest
# timeout-minutes: 15
# steps:
# - uses: styfle/cancel-workflow-action@0.9.1
# with:
# all_but_latest: true
# - uses: actions/checkout@v2
# 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 @@ -19,6 +19,10 @@ on:
- '.spellcheck.dict.txt'
- '**/*.md'

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

jobs:
android:
name: Android
Expand All @@ -29,10 +33,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/cancel-workflow-action@0.9.1
with:
all_but_latest: true

- uses: actions/checkout@v2
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 @@ -19,6 +19,10 @@ on:
- '.spellcheck.dict.txt'
- '**/*.md'

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

jobs:
ios:
name: iOS
Expand All @@ -28,10 +32,6 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: styfle/cancel-workflow-action@0.9.1
with:
all_but_latest: true

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

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

jobs:
jest:
name: Jest
Expand All @@ -26,9 +30,6 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: styfle/cancel-workflow-action@0.9.1
with:
all_but_latest: true
- uses: actions/checkout@v2
with:
fetch-depth: 50
Expand Down

0 comments on commit 2db1b92

Please sign in to comment.