mirror of
https://github.com/ClementTsang/bottom
synced 2025-02-16 13:18:28 +00:00
ci: test cancelling stale actions (#851)
Use Github Action's concurrency settings to cancel old actions in favour of newer ones.
This commit is contained in:
parent
97ba34e3f4
commit
4240a38ced
5 changed files with 20 additions and 6 deletions
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
@ -1,11 +1,11 @@
|
|||
# Main CI pipeline to validate PRs.
|
||||
# Main CI workflow to validate PRs.
|
||||
#
|
||||
# CI pipeline based on:
|
||||
# CI workflow based on:
|
||||
# - https://github.com/heim-rs/heim/blob/master/.github/workflows/ci.yml
|
||||
# - https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/ci.yml
|
||||
# - https://www.reillywood.com/blog/rust-faster-ci/
|
||||
#
|
||||
# CI pipeline should do:
|
||||
# It should do the following:
|
||||
# - cargo fmt on supported platforms
|
||||
# - cargo test on supported platforms, cargo check on unsupported
|
||||
# - cargo clippy after (apparently faster) on supported platforms
|
||||
|
@ -24,6 +24,10 @@ env:
|
|||
CARGO_PROFILE_DEV_DEBUG: 0
|
||||
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# Runs rustfmt + tests + clippy on the main supported platforms.
|
||||
supported:
|
||||
|
@ -54,7 +58,6 @@ jobs:
|
|||
id: skip_check
|
||||
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
|
||||
with:
|
||||
concurrent_skipping: "same_content_newer"
|
||||
skip_after_successful_duplicate: "true"
|
||||
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml"]'
|
||||
do_not_skip: '["workflow_dispatch", "push"]'
|
||||
|
@ -209,7 +212,6 @@ jobs:
|
|||
id: skip_check
|
||||
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
|
||||
with:
|
||||
concurrent_skipping: "same_content_newer"
|
||||
skip_after_successful_duplicate: "true"
|
||||
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml"]'
|
||||
do_not_skip: '["workflow_dispatch", "push"]'
|
||||
|
|
5
.github/workflows/coverage.yml
vendored
5
.github/workflows/coverage.yml
vendored
|
@ -12,6 +12,10 @@ on:
|
|||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
pre_job:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -21,7 +25,6 @@ jobs:
|
|||
- id: skip_check
|
||||
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
|
||||
with:
|
||||
concurrent_skipping: "same_content_newer"
|
||||
skip_after_successful_duplicate: "false"
|
||||
paths: '["tests/**", "src/**", ".github/workflows/coverage.yml", ".cargo/**", "Cargo.toml", "Cargo.lock", "build.rs"]'
|
||||
do_not_skip: '["workflow_dispatch", "push"]'
|
||||
|
|
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
|
@ -1,3 +1,5 @@
|
|||
# Workflow to deploy mkdocs documentation.
|
||||
|
||||
name: docs
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
|
1
.github/workflows/post-release.yml
vendored
1
.github/workflows/post-release.yml
vendored
|
@ -1,4 +1,5 @@
|
|||
# Actions to run after releasing a version, like generating documentation via mkdocs or notifying packaging repos.
|
||||
|
||||
name: post-release
|
||||
|
||||
on:
|
||||
|
|
6
.github/workflows/test-docs.yml
vendored
6
.github/workflows/test-docs.yml
vendored
|
@ -1,8 +1,14 @@
|
|||
# Small CI workflow to test if mkdocs documentation can be successfully built.
|
||||
|
||||
name: test-docs
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
pre_job:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
Loading…
Add table
Reference in a new issue