Skip to content

ci: upload coverage to Codecov#73

Merged
nficano merged 1 commit into
mainfrom
chore/codecov-upload
May 25, 2026
Merged

ci: upload coverage to Codecov#73
nficano merged 1 commit into
mainfrom
chore/codecov-upload

Conversation

@nficano
Copy link
Copy Markdown
Contributor

@nficano nficano commented May 25, 2026

Summary

  • Run koverXmlReport alongside test (Kover is already configured in the root build.gradle.kts).
  • Upload the aggregated XML (build/reports/kover/report.xml) to Codecov.
  • fail_ci_if_error: false so a Codecov outage cannot break CI.

Pre-merge action required

  • Add CODECOV_TOKEN as a repo secret (gh secret set CODECOV_TOKEN --repo agentruntimecontrolprotocol/kotlin-sdk).
  • Activate the repo at app.codecov.io.

Test plan

  • Merge, confirm coverage uploads on next push to main.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Enhanced CI testing pipeline with code coverage reporting. Tests now generate coverage metrics, with results automatically uploaded to Codecov for improved visibility into test quality and coverage tracking.

Review Change Stack

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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Walkthrough

The CI workflow's test job is updated to generate Kover coverage reports during test execution and upload the aggregated report to Codecov. The test step now includes koverXmlReport task, and a new Codecov upload step posts the report with a pinned action, non-blocking on upload failures.

Changes

CI Coverage Collection and Upload

Layer / File(s) Summary
Kover coverage collection and Codecov upload
.github/workflows/test.yml
Test step invokes koverXmlReport to generate coverage alongside tests. New Codecov upload step posts build/reports/kover/report.xml to Codecov using pinned action SHA, with fail_ci_if_error: false to prevent CI failure if upload fails.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci: upload coverage to Codecov' directly and clearly summarizes the main change: adding Codecov coverage upload to the CI workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/codecov-upload

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between ad901af and 04694f2.

📒 Files selected for processing (1)
  • .github/workflows/test.yml

Comment on lines +74 to +75
- name: Test (with Kover coverage)
run: ./gradlew --no-daemon test koverXmlReport
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

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.

Suggested change
- 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.

@nficano nficano merged commit a3860a6 into main May 25, 2026
5 checks passed
@nficano nficano deleted the chore/codecov-upload branch May 25, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant