mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
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 changed files with 13 additions and 1 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -11,6 +11,10 @@ env:
|
|||
CARGO_TERM_COLOR: always
|
||||
NIGHTLY_TOOLCHAIN: nightly
|
||||
|
||||
concurrency:
|
||||
group: ${{github.workflow}}-${{github.ref}}
|
||||
cancel-in-progress: ${{github.event_name == 'pull_request'}}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
|
|
4
.github/workflows/dependencies.yml
vendored
4
.github/workflows/dependencies.yml
vendored
|
@ -12,6 +12,10 @@ on:
|
|||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: ${{github.workflow}}-${{github.ref}}
|
||||
cancel-in-progress: ${{github.event_name == 'pull_request'}}
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
|
|
1
.github/workflows/docs.yml
vendored
1
.github/workflows/docs.yml
vendored
|
@ -4,7 +4,6 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
# Allows running the action manually.
|
||||
workflow_dispatch:
|
||||
|
||||
|
|
5
.github/workflows/validation-jobs.yml
vendored
5
.github/workflows/validation-jobs.yml
vendored
|
@ -7,6 +7,11 @@ on:
|
|||
branches:
|
||||
- main
|
||||
|
||||
|
||||
concurrency:
|
||||
group: ${{github.workflow}}-${{github.ref}}
|
||||
cancel-in-progress: ${{github.event_name == 'pull_request'}}
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
NIGHTLY_TOOLCHAIN: nightly
|
||||
|
|
Loading…
Reference in a new issue