ci: upload coverage to Codecov#73
Conversation
Kover is already configured in the root build.gradle.kts (aggregating :lib and :tests). Switch the test step to also run koverXmlReport and upload the aggregated XML to Codecov. Non-blocking. Requires CODECOV_TOKEN to be set as a repo secret. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
WalkthroughThe CI workflow's ChangesCI Coverage Collection and Upload
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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/test.yml:
- Around line 74-75: The CI step "Test (with Kover coverage)" currently runs
"./gradlew --no-daemon test koverXmlReport" which generates XML but does not
enforce coverage limits; update that step to also run "koverVerify" (e.g.,
"./gradlew --no-daemon test koverXmlReport koverVerify" or add a follow-up run
invoking koverVerify) so the Gradle task koverVerify is executed and coverage
thresholds defined in build.gradle.kts are enforced.
🪄 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: 5d0ec865-beef-4bc3-b103-9f3144996e90
📒 Files selected for processing (1)
.github/workflows/test.yml
| - name: Test (with Kover coverage) | ||
| run: ./gradlew --no-daemon test koverXmlReport |
There was a problem hiding this comment.
Run koverVerify in CI to enforce coverage thresholds.
The new command generates XML but skips threshold enforcement, so coverage regressions won’t fail CI despite build.gradle.kts defining verify bounds. Please include koverVerify in this step.
Suggested patch
- - name: Test (with Kover coverage)
- run: ./gradlew --no-daemon test koverXmlReport
+ - name: Test (with Kover coverage)
+ run: ./gradlew --no-daemon test koverXmlReport koverVerify📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Test (with Kover coverage) | |
| run: ./gradlew --no-daemon test koverXmlReport | |
| - name: Test (with Kover coverage) | |
| run: ./gradlew --no-daemon test koverXmlReport koverVerify |
🤖 Prompt for 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.
In @.github/workflows/test.yml around lines 74 - 75, The CI step "Test (with
Kover coverage)" currently runs "./gradlew --no-daemon test koverXmlReport"
which generates XML but does not enforce coverage limits; update that step to
also run "koverVerify" (e.g., "./gradlew --no-daemon test koverXmlReport
koverVerify" or add a follow-up run invoking koverVerify) so the Gradle task
koverVerify is executed and coverage thresholds defined in build.gradle.kts are
enforced.
Summary
koverXmlReportalongsidetest(Kover is already configured in the rootbuild.gradle.kts).build/reports/kover/report.xml) to Codecov.fail_ci_if_error: falseso a Codecov outage cannot break CI.Pre-merge action required
CODECOV_TOKENas a repo secret (gh secret set CODECOV_TOKEN --repo agentruntimecontrolprotocol/kotlin-sdk).Test plan
main.🤖 Generated with Claude Code
Summary by CodeRabbit