Skip to content

Commit

Permalink
.github/workflows: Don't allow concurrent workflow runs (#3000)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Oct 15, 2022
1 parent b5612dc commit 981d586
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 44 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/cargo-deny-pr.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
name: cargo deny

on:
push:
paths:
- '**/Cargo.toml'
pull_request:
paths:
- '**/Cargo.toml'

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

jobs:
cargo-deny:
runs-on: ubuntu-latest
Expand Down
46 changes: 4 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
branches:
- master

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

jobs:
test-desktop:
name: Build and test
Expand All @@ -18,12 +22,6 @@ jobs:
"--benches --all-features",
]
steps:

- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

- name: Install Protoc
uses: arduino/setup-protoc@v1

Expand Down Expand Up @@ -53,12 +51,6 @@ jobs:
run:
shell: bash
steps:

- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

- name: Install Protoc
uses: arduino/setup-protoc@v1

Expand Down Expand Up @@ -91,12 +83,6 @@ jobs:
name: Check rustdoc intra-doc links
runs-on: ubuntu-latest
steps:

- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

- name: Install Protoc
uses: arduino/setup-protoc@v1

Expand All @@ -116,12 +102,6 @@ jobs:
check-clippy:
runs-on: ubuntu-latest
steps:

- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

- name: Install Protoc
uses: arduino/setup-protoc@v1

Expand All @@ -145,12 +125,6 @@ jobs:
name: Integration tests
runs-on: ubuntu-latest
steps:

- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

- name: Install Protoc
uses: arduino/setup-protoc@v1

Expand All @@ -170,12 +144,6 @@ jobs:
rustfmt:
runs-on: ubuntu-latest
steps:

- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3

- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
Expand All @@ -191,12 +159,6 @@ jobs:
manifest_lint:
runs-on: ubuntu-latest
steps:

- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3

- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/interop-test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: Interoperability Testing

on:
pull_request:
push:
branches:
- master
name: Interoperability Testing

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

jobs:
# NOTE: during a pull request run, github creates a merge commit referenced in `github.sha`
Expand All @@ -24,4 +29,4 @@ jobs:
composition_file: "ping/_compositions/go-rust-interop-latest.toml"
custom_git_target: github.com/${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
custom_git_reference: ${{ github.event.pull_request.head.sha || github.sha }}
custom_interop_target: rust
custom_interop_target: rust

0 comments on commit 981d586

Please sign in to comment.