add cancel in progress support to automated CI checks (#11130)
# Objective When working on PRs, I'll often find that one of the early CI checks fails, and work on fixing the result, but when I push the earlier commits are still being processed by the CI. This would mean that if a new commit is pushed while another CI process is already running on that branch, the first set of jobs will be cancelled - reducing wasted resources and wait time for CI on the latest commits. ## Solution The solution is simply adding Github's concurrency groups to every relevant workflow.
This commit is contained in:
parent
557e582ec5
commit
f0c41b6135
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -11,6 +11,10 @@ env:
|
|||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
NIGHTLY_TOOLCHAIN: nightly
|
NIGHTLY_TOOLCHAIN: nightly
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{github.workflow}}-${{github.ref}}
|
||||||
|
cancel-in-progress: ${{github.event_name == 'pull_request'}}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
|
4
.github/workflows/dependencies.yml
vendored
4
.github/workflows/dependencies.yml
vendored
@ -12,6 +12,10 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{github.workflow}}-${{github.ref}}
|
||||||
|
cancel-in-progress: ${{github.event_name == 'pull_request'}}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
1
.github/workflows/docs.yml
vendored
1
.github/workflows/docs.yml
vendored
@ -4,7 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
|
|
||||||
# Allows running the action manually.
|
# Allows running the action manually.
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
5
.github/workflows/validation-jobs.yml
vendored
5
.github/workflows/validation-jobs.yml
vendored
@ -7,6 +7,11 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{github.workflow}}-${{github.ref}}
|
||||||
|
cancel-in-progress: ${{github.event_name == 'pull_request'}}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
NIGHTLY_TOOLCHAIN: nightly
|
NIGHTLY_TOOLCHAIN: nightly
|
||||||
|
Loading…
Reference in New Issue
Block a user