-
Notifications
You must be signed in to change notification settings - Fork 55
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
Adding cargo semver checks #369
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #369 +/- ##
=======================================
Coverage 76.86% 76.86%
=======================================
Files 47 47
Lines 9436 9436
Branches 9436 9436
=======================================
Hits 7253 7253
Misses 1789 1789
Partials 394 394 ☔ View full report in Codecov by Sentry. |
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.
is this the last step of what we discussed in slack? namely:
- if bump minor version = fail this CI when semver checks fail
- if bump major version = job is just expected to fail? or not run?
- if no version change, job adds tag if fails (will it report success in UI in this case?)
e6c0818
to
b715a03
Compare
b715a03
to
ed47177
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.
LGTM but curious if this job is red will it fail and add the label but stay red? can we get it to 'succeed' (when it fails semver) just so it doesn't look like CI is breaking for any breaking change?
The |
Ah nice okay thanks!! |
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.
LGTM. Sanity checked this using act. It failed on a far away commit due to a pub api change, but succeeded when treating "pr.base.sha" as the previous commit.
Thanks for the link to |
Adding a check that will run
cargo semver-checks
against each PR.This implements a check for PRs that don't bump the crate version. The check will be run between the
HEAD
of the PR andmain
. So any changes introduced in the PR vs main that break semver are picked up, and the PR will be labeled withbreaking-change
.Currently can't test the actual adding of a label because (probably) the check needs to be in the main repo, rather than in a PR branch, to be allowed to get write access to the repo.
So sadly to actually test this we'll need to merge and see if it works. (hooray github actions dev workflow)