Skip to content

Cancel concurrent CI runs to save budget - #3263

Merged
janosh merged 4 commits into
masterfrom
ci-cancel-concurrent-runs
Aug 23, 2023
Merged

janosh merged 4 commits into
masterfrom
ci-cancel-concurrent-runs

Conversation

@janosh

@janosh janosh commented Aug 23, 2023 •

Copy link
Copy Markdown
Member

If a PR receives commits in short succession, CI runs for previous commits are cancelled, leaving only the runs for the last commit to run to conclusion. This avoids wasted compute on testing outdated code.

As suggested by https://scientific-python.github.io/repo-review. Thanks @jarrodmillman for the pointer.

60617e2 add concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true
019cb66 add commit hook https://github.com/adamchainz/blacken-docs
8349d2c use assignment for single-key dict.update()

@janosh janosh added linting Linting and quality assurance ci Continuous integration labels Aug 23, 2023
@janosh
janosh enabled auto-merge (squash) August 23, 2023 03:24
@janosh janosh changed the title Cancel concurrent runs CI to save budget Cancel concurrent CI runs to save budget Aug 23, 2023
@jarrodmillman

Copy link
Copy Markdown

@henryiii More projects benefiting from https://learn.scientific-python.org/development/guides/repo-review/

Thanks again for such a useful tool!

@janosh

janosh commented Aug 23, 2023

Copy link
Copy Markdown
Member Author

@jarrodmillman Just curious if you guys have any tricks to suppress the "Run cancelled" email notifications from GitHub? Saw this popular community discussion which looks like there's no way to configure that atm?

@janosh
janosh disabled auto-merge August 23, 2023 14:39
@janosh
janosh merged commit 59de1c5 into master Aug 23, 2023
@janosh
janosh deleted the ci-cancel-concurrent-runs branch August 23, 2023 14:39
@henryiii

Copy link
Copy Markdown

I've not seen one yet, other than setting up a filter in your mail application/service. :) But I haven't looked very hard or very recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration linting Linting and quality assurance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants