Closed zhaop closed 1 month ago
Related to https://github.com/TheBevyFlock/bevy_quickstart/issues/291.
I suppose when following the README, your initial commit won't include a Cargo.lock
file?
EDIT: Actually it looks like it should be included... maybe the current Cargo.lock
file is outdated somehow.
Trying to reproduce this with a public repo this time: https://github.com/zhaop/quickstart-test/actions
Actions are running; and there is a Cargo.lock in there.
EDIT: The same failures are here: https://github.com/zhaop/quickstart-test/actions/runs/10818362101
I was able to reproduce this as well, with a fresh cargo generate
followed by cargo test --locked
. After making an initial commit and running cargo test
, the Cargo.lock
file does indeed change:
I believe this could be fixed by adding a post-generate hook that runs cargo update
.
This issue (as well as https://github.com/TheBevyFlock/bevy_quickstart/issues/300) highlights the need for a CI workflow that runs cargo generate
followed by cargo test
etc. in the generated repo. Examples of this can be found in other cargo-generate
template repos, including the following:
Fixed via documentation, but a better solution would be to run cargo update -p {{project-name}}
in a post-generate hook to save one user step.
I followed the README and set up a project with this template. Now on my GitHub repo's actions tab I see Tests, Clippy and Docs all fail:
Tests -> Run tests:
Clippy -> Run clippy lints:
Docs -> Check documentation: