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

Reduce CI Runs on Draft PRs #412

Merged
merged 2 commits into from
Oct 11, 2023
Merged

Reduce CI Runs on Draft PRs #412

merged 2 commits into from
Oct 11, 2023

Conversation

JP-Ellis
Copy link
Contributor

@JP-Ellis JP-Ellis commented Oct 8, 2023

📝 Summary

Limit a number CI workflows to run only on finalised PRs, specifically excluding draft PRs.

🚨 Breaking Changes

🔥 Motivation

Draft PRs are a great way of sharing work that is in progress, but not yet ready to be reviewed and merged. Running a large number of CI workflows every time the draft PR is updated creates unnecessary noise.

Furthermore, Cirrus CI has monthly limits, and the draft PRs really have no reason to use up these resources.

🔨 Test Plan

See #413

🔗 Related issues/PRs

@JP-Ellis JP-Ellis requested a review from YOU54F October 8, 2023 22:19
@JP-Ellis JP-Ellis self-assigned this Oct 8, 2023
As draft PRs are explicitly in a state which is not ready to be merged,
there is no need to run the full suite of CI workflows every time there
is an update. In particular, this commit disables:

- Cirrus workflows, as Cirrus has a minute quota
- Wheel builds
- Long-running tests

The test matrix is _still_ being run.

Signed-off-by: JP-Ellis <josh@jpellis.me>
The previous configuration for concurrency group used `head_ref`
incorrectly resulting in separate runs on master being cancelled.

This solution was taken from: https://stackoverflow.com/a/75403978/1573761

Signed-off-by: JP-Ellis <josh@jpellis.me>
Copy link

@Ilia Ilia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JP-Ellis JP-Ellis merged commit 21fdec0 into master Oct 11, 2023
49 checks passed
@JP-Ellis JP-Ellis deleted the ci/draft-pr branch October 11, 2023 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Completed
Development

Successfully merging this pull request may close these issues.

Reduce CI Runs on Draft PRs
3 participants