Skip to content

Commit

Permalink
Actually get concurrency working on a PR
Browse files Browse the repository at this point in the history
  • Loading branch information
pksunkara committed Oct 28, 2021
1 parent 3fbcfac commit 90f7c60
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ on:
pull_request:
branches: [master]
concurrency:
group: ci-pr-${{ github.ref }}
group: ci-pr-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
check:
name: CHECK
runs-on: ubuntu-latest
steps:
- run: |
echo "${{ github.head_ref }}"
echo "${{ github.ref }}"
ci-pr:
name: CI-PR
needs: [test-minimal, test-full, msrv]
Expand Down Expand Up @@ -35,9 +42,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Compile
run: cargo test --no-run ${{ env.FLAGS }}
uses: actions-rs/cargo@v1
with:
command: test
args: --no-run ${{ env.FLAGS }}
- name: Test
run: cargo test ${{ env.FLAGS }}
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ env.FLAGS }}
test-full:
name: Tests (Full)
env:
Expand All @@ -60,9 +73,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Compile
run: cargo test --no-run ${{ env.FLAGS }}
uses: actions-rs/cargo@v1
with:
command: test
args: --no-run ${{ env.FLAGS }}
- name: Test
run: cargo test ${{ env.FLAGS }}
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ env.FLAGS }}
msrv:
name: "Check MSRV: 1.54.0"
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: CI
on:
push:
branches: [staging, trying]
concurrency:
group: ci-${{ github.ref}}
cancel-in-progress: true
jobs:
ci:
name: CI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches: [master]
concurrency:
group: coverage-${{ github.ref }}
group: coverage-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
coverage:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches: [staging, trying]
concurrency:
group: lint-${{ github.ref }}
group: lint-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
lint:
Expand Down

0 comments on commit 90f7c60

Please sign in to comment.