-
-
Notifications
You must be signed in to change notification settings - Fork 487
Test lockfile is up-to-date #1739
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
Conversation
|
Success: the new test failed. I'll now fix up |
.github/workflows/test.yml
Outdated
| - uses: actions/checkout@v6 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - run: cargo check --workspace | ||
| - run: test "$(git status --porcelain)" == "" |
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.
I think we can remove the last command and use cargo check --workspace --locked instead.
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 there is a command for this; well spotted.
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.
Not quite. It still downloads and checks all dependencies which is a bit redundant in our case.
378d0c7 to
989872d
Compare
Checks that Cargo.lock was properly updated after repository crate versions were changed. Based on rust-random/rand#1739
Trusted-publishing failed recently due to the lockfile being outdated (because the
randversion number inCargo.tomlhad been changed and for whatever reason this must be listed inCargo.locktoo).This test should ensure CI fails before trying to run a publish job should this happen again.
(Alternatively, we could just remove
Cargo.lockfrom version control.)