Skip to content

chore: smoke --help and --version in CI - #57

Merged
kipyin merged 2 commits into
mainfrom
cloud/ci-help-version-smoke-c93e
Oct 19, 2026
Merged

kipyin merged 2 commits into
mainfrom
cloud/ci-help-version-smoke-c93e

Conversation

@kipyin

@kipyin kipyin commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

test + fmt + clippy
  Format
  Test
  Clippy
  Smoke --help and --version
    GITEE_CONFIG_DIR = empty temp dir
    unset GITEE_TOKEN
    cargo run --quiet --locked -- --help
    cargo run --quiet --locked -- --version
    stdout contains the Cargo.toml version

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. --help and --version exit in clap before any API work. Config is an empty GITEE_CONFIG_DIR and GITEE_TOKEN is unset, so startup does not read the runner's config. HOME stays as the runner set it: rustup looks up the toolchain in $HOME/.rustup.

No CHANGELOG entry: the file has no Unreleased section.

Closes #6

Evidence

  • Before: CI ended at clippy. A clap setup panic or a bin target that fails to start could still pass unit tests.
    After: locally, cargo run --quiet --locked -- --help and --version both exit 0. --version prints gitee 0.2.3, which matches version in Cargo.toml. The same binary exits 0 for both flags inside a network namespace (15s timeout). Overriding HOME without RUSTUP_HOME reproduces 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 run invocations of the binary already built by test and clippy. A smoke failure fails that job. No CLI or dependency changes.

Open in Web Open in Cursor 

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.
@kipyin
kipyin merged commit cd86723 into main Oct 19, 2026
2 checks passed
@kipyin
kipyin deleted the cloud/ci-help-version-smoke-c93e branch October 19, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: add --version/--help smoke to CI as a post-build sanity check

1 participant