mirror of
https://github.com/jj-vcs/jj.git
synced 2025-12-23 06:01:01 +00:00
When a pull request is pushed multiple times in sequence (e.g. to fix small errors that are noticed post-submission), a backlog of builds ends up needing to be cleared out before your new update can be built. If you push N times, N builds are queued and need to clear out first. This can cause higher latency for *every* PR since the pool of public runners is shared, and in general seems uneconomical and inefficient since 99% of the time you want to build the new version ASAP. Luckily GHA has a universal solution to this: use the `concurrency` directive to group all builds for a PR under a name, and when a new build appears in that group, cancel all builds in the group that are in-progress. Taken from this useful blog post: "Simple trick to save environment and money when using GitHub Actions" https://turso.tech/blog/simple-trick-to-save-environment-and-money-when-using-github-actions Signed-off-by: Austin Seipp <aseipp@pobox.com>
26 lines
623 B
YAML
26 lines
623 B
YAML
name: Codespell
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
codespell:
|
|
name: Codespell
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
- uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630
|
|
with:
|
|
check_filenames: true
|
|
check_hidden: true
|
|
skip: ./target,./.jj,*.lock
|
|
ignore_words_list: crate,NotIn,Wirth
|