ci: allow docs-only pull requests to skip tests#12174
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughUpdates the CI workflow configuration to add guard conditions preventing test execution when only documentation changes are detected. Three test jobs (test-backend, test-frontend-unit, test-frontend) now require the docs-only check to be false before running, using the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (44.32%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #12174 +/- ##
==========================================
- Coverage 38.27% 38.26% -0.01%
==========================================
Files 1630 1630
Lines 80233 80238 +5
Branches 12114 12114
==========================================
- Hits 30708 30702 -6
- Misses 47788 47800 +12
+ Partials 1737 1736 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 239-240: The condition allows tests to run when the path-filter
job was skipped because needs.path-filter.outputs.docs-only is null; update the
test job conditions (for test-frontend-unit, test-frontend and the occurrence
using needs.set-ci-condition and needs.path-filter) to first verify path-filter
actually ran by checking needs.path-filter.result != 'skipped' (or == 'success')
before evaluating needs.path-filter.outputs.docs-only != 'true' so that a
skipped path-filter does not cause null != 'true' to pass; in short, add a guard
like needs.path-filter.result != 'skipped' &&
needs.path-filter.outputs.docs-only != 'true' alongside the existing
should-run-tests 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
Run ID: 7421b1c5-2860-43b2-86bc-532f25c2e56a
📒 Files selected for processing (1)
.github/workflows/ci.yml
If a pull request only changes files at
docs/**, the workflow will skip running Python, Jest, and TypeScript tests, saving CI resources and time. The docs PR can also still merge if the nightly build is failing.The
docs-onlypath filter is defined in ci.yml.Summary by CodeRabbit