ci: add coverage gate to reject PRs below 90% coverage - #14
Conversation
PR SummaryLow Risk Overview Adds Written by Cursor Bugbot for commit 61095d3. This will update automatically on new commits. Configure here. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughCI workflow enhanced with code coverage reporting and enforcement. The Rust CI pipeline now generates Cobertura-formatted coverage reports and enforces a 90% minimum coverage threshold with main branch comparison. Coverage artifact added to gitignore. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Code Coverage SummaryDetailsResults for commit: 61095d3 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
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-rust.yml:
- Around line 49-59: Add a permissions block to the workflow job that runs the
"Coverage report and gate" (uses: insightsengineering/coverage-action@v3) so the
GITHUB_TOKEN has the required scopes: grant pull-requests: write (for publish:
true) and contents: write (for diff-storage: _xml_coverage_reports); update the
job (e.g., check job) to include a top-level permissions mapping with those keys
so the action can post PR comments and write the coverage XML without "Resource
not accessible by integration" errors.
- Use cargo-llvm-cov --cobertura for Cobertura XML output - Add insightsengineering/coverage-action to enforce threshold and publish PR comments - Fail on coverage below 90% (threshold) and on coverage rate reduction vs main - Enable diff report against main branch for PR visibility Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
fff5a58 to
61095d3
Compare
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Summary
Adds
insightsengineering/coverage-actionto enforce test coverage on PRs.Changes
cargo llvm-covwith Cobertura XML outputmainCoverage
Current coverage ~92.5%, threshold set to 90%.