Repository navigation
chore: smoke --help and --version in CI - #57
Merged
Merged
Conversation
Run both after the cached test and clippy build so a clap or binary startup failure fails the job without calling the Gitee API.
GITEE_CONFIG_DIR points at an empty directory instead. Overriding HOME hid $HOME/.rustup and cargo could not find the toolchain.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The existing CI job runs both commands after test and clippy so the debug build is reused. There is one bin target (
gitee), so the step does not pass--bin.--helpand--versionexit in clap before any API work. Config is an emptyGITEE_CONFIG_DIRandGITEE_TOKENis unset, so startup does not read the runner's config.HOMEstays as the runner set it: rustup looks up the toolchain in$HOME/.rustup.No
CHANGELOGentry: the file has noUnreleasedsection.Closes #6
Evidence
After: locally,
cargo run --quiet --locked -- --helpand--versionboth exit 0.--versionprintsgitee 0.2.3, which matchesversioninCargo.toml. The same binary exits 0 for both flags inside a network namespace (15s timeout). OverridingHOMEwithoutRUSTUP_HOMEreproduces the first CI failure (rustup could not choose a version of cargo); the step no longer does that.Merge Danger
Door: two-way
Deleting the new step restores the previous workflow.
Blast Radius: CI
The job gains two
cargo runinvocations of the binary already built by test and clippy. A smoke failure fails that job. No CLI or dependency changes.