ci: add JaCoCo code coverage with Codecov integration#2623
ci: add JaCoCo code coverage with Codecov integration#2623mmodzelewski merged 17 commits intoapache:masterfrom
Conversation
1509d55 to
8bbdf37
Compare
|
@ex172000 can you modify single file java file under this PR so we can see how does the codecov comment looks like? |
Yes definitely. Was trying to fix issues first. Will add it in the next commit(s). |
Hi @mmodzelewski @hubcio , sorry it took a while. Something came up from work. I will return to fix the Java part tomorrow afternoon Pacific time. Will update to OPEN state as soon as it's ready for review. |
Add comprehensive code coverage reporting for Java modules using JaCoCo and integrate with Codecov for PR coverage reports. Changes: - Add JaCoCo plugin (v0.8.14) to common conventions for all modules - Create aggregated coverage report task combining all module coverage - Update GitHub Actions to generate coverage reports and upload to Codecov - Add .codecov.yml configuration with 70% threshold for new code - Configure XML reports for Codecov and HTML for local viewing Coverage reports will automatically appear as PR comments showing: - Overall coverage percentage and trends - Coverage diff for changed files - File-by-file coverage breakdown Coverage can be viewed locally with: ./gradlew test jacocoAggregatedReport open build/reports/jacoco/aggregate/html/index.html
Move codecov upload from composite action to _test.yml where secrets are accessible, upgrade to codecov-action@v5, add Rust coverage flag, and set require_changes to suppress comments on unrelated PRs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2623 +/- ##
============================================
- Coverage 68.85% 67.87% -0.98%
- Complexity 0 637 +637
============================================
Files 575 734 +159
Lines 55672 59374 +3702
Branches 55672 55787 +115
============================================
+ Hits 38334 40303 +1969
- Misses 15467 17113 +1646
- Partials 1871 1958 +87
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Add comprehensive tests for HeaderValue (all 12 types, factory methods, accessors, validation, toString, equals/hashCode) and HeaderKey (fromString, validation, equals/hashCode, UTF-8 handling). Also raise codecov patch target from 70% to 80%. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
690574d to
e0a1c91
Compare
The build.sh script was removed in an upstream refactor. Use ./gradlew jacocoAggregatedReport directly, matching the pattern used by other steps in the composite action. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove HeaderKey/HeaderValue tests and increase the codecov project threshold from 0.5% to 6% to accommodate the coverage drop from adding Java reporting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mmodzelewski
left a comment
There was a problem hiding this comment.
Hey @ex172000, please have a look at the few suggestions I've added.
Thanks for the review, please take another look? |
|
@hubcio, would you mind checking it as well? |
Add code coverage reporting for Java modules using JaCoCo and integrate with Codecov for PR coverage reports.
Changes: