ci: add test gate to release workflow#23
Open
don-petry wants to merge 8 commits intooneirosoft:mainfrom
Open
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>
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.
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