ci: add test gate to release workflow#23
Conversation
Add a test job (fmt, clippy, cargo test) that must pass before the build matrix runs, ensuring tagged releases are never published from code that fails basic quality checks. Refs oneirosoft#11 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a Rust quality gate to the tag-based release workflow so releases only build/publish after basic checks (formatting, clippy, and tests) pass on the tagged commit.
Changes:
- Add a new
testjob torelease.ymlthat runscargo fmt,cargo clippy -D warnings, andcargo test. - Make the
buildjob depend on the newtestjob (and still onverify_tag_on_main) so the build matrix won’t start unless tests pass.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After merging upstream/main, the RemotePushActionKind enum was renamed from CreateRemoteBranch to Create. Update test code to use the correct variant names (Create, Update, ForceUpdate). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The enum was renamed from CreateRemoteBranch/UpdateRemoteBranch/ForceUpdateRemoteBranch to Create/Update/ForceUpdate but render.rs still used the old names. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Automated review — APPROVEDRisk: LOW SummaryPR adds a test gate (fmt, clippy, cargo test) to the release workflow before the build matrix runs, and fixes all clippy lints that the new stricter CI exposes. CI is fully green (Verify + Security Audit both pass), no secrets or auth changes are present, and all mechanical Rust fixes are correct. One minor note: tests run with --release flag which skips debug assertions, but this is not a blocking concern. FindingsAll findings are informational only — no blockers.
CI statusAll CI checks pass (Verify + Security Audit green). Reviewed by the don-petry PR-review cascade (triage: haiku 4.5 → deep: sonnet 4.6 → audit: opus 4.6). Reply with |
Why?
The release workflow builds and publishes binaries without running any tests first. A broken commit that happens to have a tag could ship corrupted binaries to users. Adding a test gate ensures every release passes formatting, linting, and tests before artifacts are built.
Summary
testjob to the release workflow that runscargo fmt --all --check,cargo clippy --locked --all-targets -- -D warnings, andcargo test --lockedverify_tag_on_mainand must pass before thebuildmatrix startsRefs #11 (item 2)
Test plan
testjob executes beforebuildbuildis skipped iftestfails🤖 Generated with Claude Code