-
Notifications
You must be signed in to change notification settings - Fork 101
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
GitHub Actions CI template: do not skip intermediate builds on the main
, master
, or release-*
branches
#341
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #341 +/- ##
===========================================
- Coverage 94.62% 79.17% -15.45%
===========================================
Files 20 20
Lines 632 629 -3
===========================================
- Hits 598 498 -100
- Misses 34 131 +97
Continue to review full report at Codecov.
|
47a582c
to
1974b1b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems sensible to me!
Looks like the reference tests need updating (they only run on Julia v1.7.1 which is why that CI job fails), then LGTM
Also please bump the version and I'll release straight away
Thanks!
group: ${{ github.workflow }}-${{ github.ref }} | ||
# Skip intermediate builds: all builds except for builds on the `main`, `master`, or `release-*` branches | ||
# Cancel intermediate builds: only pull request builds | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.ref != 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') || github.run_number }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain a little more what this does? I read https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency but I'm still a bit confused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, roughly speaking, if two separate builds have the same concurrency group
value, then the second build will have to wait until the first build has completed. Additionally, if three builds all have the same concurrency group
value, then while the first build is happening, the second and third build will have to wait, but once the first build has completed, the second build will be completely skipped, and the third build will start.
This is good for PRs, but usually it is undesirable to not run CI on every commit pushed to main
or master
. Therefore, for commits on main
, master
, and release-*
, we create a unique concurrency group
value. This ensures that two different commits on main
never have the same concurrency group
value, and thus builds on main
are never skipped.
For commits on PRs, two separate commits on the same PR will have the same concurrency group
value. Therefore, if multiple commits are pushed to a PR, we can skip CI on the intermediate commits, and only run CI on the latest commit of the PR, since that is the code that we actually care about.
1974b1b
to
c8edbe8
Compare
…ain`, `master`, or `release-*` branches
c8edbe8
to
a539016
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #341 +/- ##
===========================================
- Coverage 94.33% 77.46% -16.88%
===========================================
Files 24 24
Lines 742 741 -1
===========================================
- Hits 700 574 -126
- Misses 42 167 +125 ☔ View full report in Codecov by Sentry. |
@gdalle @nickrobinson251 How would I go about fixing the CI failures here? |
Follow-up to #325