ci: skip build/test on non-code changes - #111
Conversation
build (ubuntu/macos/windows) is a required status check, so the job still runs and reports on every PR - only the checkout/build/test steps are skipped on docs-only diffs, saving the runner minutes and the sccache/rust-cache churn that was filling the Actions cache.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe CI workflow adds a ChangesCI Workflow Change Detection
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 13-19: The build workflow is still being skipped when the changes
job fails or is canceled because the build job only depends on needs: changes.
Update the build job in the CI workflow to use if: ${{ always() }} so it still
starts, and adjust the step-level guards in the build matrix job to also
consider needs.changes.result alongside the existing outputs so a failed or
inconclusive diff falls back to the full build/test path instead of skipping the
required check.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: fbb2f10b-714d-4a9d-a91b-c028911d81fa
📒 Files selected for processing (1)
.github/workflows/ci.yml
build depended on changes implicitly, so a failed/cancelled changes job would skip build entirely - still a passing required check, but no code ever got compiled or tested. Now the job always starts and falls back to a full build/test whenever changes.result isn't a clean success.
Summary
changesjob (dorny/paths-filter) that detects whether Cargo.toml/Cargo.lock/build.rs/crates//src/ actually changedbuildmatrix job still always runs (required status check, so it must always report), but the checkout/rust-cache/sccache/build/test steps are now individually gated on that result — a docs-only PR gets a fast green check instead of a full 3-OS compileWhy
rust-build-*caches get regenerated on every push regardless of whether source changedNot touched (intentionally)
security-check.yml(cargo audit) — also a required check, but its own comment already documents why it stays ungated (cheap with warm cache, and path-filtering a required check risks it never reporting)Test plan
build (*)goes green quickly without a real buildSummary by CodeRabbit