Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancel concurrent CI runs to save budget #3263

Merged
merged 4 commits into from Aug 23, 2023
Merged

Conversation

janosh
Copy link
Member

@janosh janosh commented Aug 23, 2023

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

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

Thanks again for such a useful tool!

@janosh
Copy link
Member Author

janosh commented Aug 23, 2023

@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
26 of 30 checks passed
@janosh janosh deleted the ci-cancel-concurrent-runs branch August 23, 2023 14:39
@henryiii
Copy link

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.

None yet

3 participants