ci: add Codecov integration for code coverage tracking#406
ci: add Codecov integration for code coverage tracking#406edeandrea merged 22 commits intodocling-project:mainfrom
Conversation
6d2e680 to
c679802
Compare
c679802 to
80b1fc1
Compare
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
:java_duke: JaCoCo coverage report
|
|
||||||||||||||
|
HTML test reports are available as workflow artifacts (zipped HTML). • Download: Artifacts for this run |
edeandrea
left a comment
There was a problem hiding this comment.
Thanks @rkmangal23 for this! I've added some comments.
Also, I'm just going to re-post from our conversation on slack so that its out in the open.
I know we collect coverage across the entire project as a whole - but do you think it would be better to break out the report per project? It would turn into separate checks and report coverage per project, for which we could then define separate thresholds. See https://docs.codecov.com/docs/commit-status#splitting-up-projects-example
For example:
It would give a single check for the whole project, but also show each individual project's coverage, which could be helpful if we want a quick visualization of where coverage is lacking
|
@all-contributors add @rkmangal23 for code doc ideas tool test infra |
|
I've put up a pull request to add @rkmangal23! 🎉 |
80b1fc1 to
e83e26c
Compare
There was a problem hiding this comment.
Pull request overview
Adds Codecov-based coverage reporting to docling-java by uploading the existing aggregated JaCoCo XML report from CI and exposing coverage status via a README badge, aligning with the broader Docling ecosystem’s Codecov usage (Fixes #199).
Changes:
- Add
codecov.ymlconfiguration (status checks, flags, ignore rules, comment layout). - Upload aggregated JaCoCo XML coverage reports to Codecov from the GitHub Actions build matrix.
- Add a Codecov badge to the project README.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
codecov.yml |
Introduces Codecov configuration for project/patch statuses, flags, and ignored paths. |
README.md |
Adds Codecov badge pointing to coverage for the main branch. |
.github/workflows/build.yml |
Uploads aggregated JaCoCo XML report to Codecov for each Java version in the matrix. |
You can also share your feedback on Copilot code review. Take the survey.
|
HTML test reports are available as workflow artifacts (zipped HTML). • Download: Artifacts for this run |
e83e26c to
22c93d1
Compare
- Add Codecov upload step to build workflow - Create codecov.yml configuration with flags for Java 17, 21, 25 - Add Codecov badge to README - Configure coverage thresholds and ignore patterns Fixes docling-project#199 Co-authored-by: Bob <bob@ibm.com> Signed-off-by: Rohan <rohan.kurian@ibm.com> Signed-off-by: Bob <bob@ibm.com>
- Remove pull_request-only condition - Allows Codecov upload on direct pushes to main - Enables coverage tracking for all commits Co-authored-by: Bob <bob@ibm.com> Signed-off-by: Rohan <rohan.kurian@ibm.com> Signed-off-by: Bob <bob@ibm.com>
- Remove matrix strategy for multiple Java versions - Use only Java 17 for coverage reports - Remove Java version flags from Codecov config - Simplifies coverage tracking and reduces CI time Co-authored-by: Bob <bob@ibm.com> Signed-off-by: Rohan <rohan.kurian@ibm.com> Signed-off-by: Bob <bob@ibm.com>
- Only run coverage reports on pull requests - Reduces unnecessary CI runs on direct pushes to main Co-authored-by: Bob <bob@ibm.com> Signed-off-by: Rohan <rohan.kurian@ibm.com> Signed-off-by: Bob <bob@ibm.com>
- Restore matrix strategy for Java 17, 21, 25 - Add flags to track coverage per Java version - Enables per-version coverage insights in Codecov Co-authored-by: Bob <bob@ibm.com> Signed-off-by: Rohan <rohan.kurian@ibm.com> Signed-off-by: Bob <bob@ibm.com>
22c93d1 to
04f125d
Compare
|
HTML test reports are available as workflow artifacts (zipped HTML). • Download: Artifacts for this run |
|
HTML test reports are available as workflow artifacts (zipped HTML). • Download: Artifacts for this run |
Remove explicit carryforward: false flags since false is the default value. Simplifies configuration by relying on Codecov defaults. Co-authored-by: Bob <bob@codeium.com> Signed-off-by: Rohan <rohan.kurian@ibm.com>
- Add condition to only run on main repo when token is available - Move CODECOV_TOKEN from env to with.token parameter (preferred by codecov-action v5) - Prevents issues with fork PRs where secrets are unavailable Addresses Copilot feedback validated by @edeandrea in PR docling-project#406 Co-authored-by: Bob <bob@codeium.com> Signed-off-by: Rohan <rohan.kurian@ibm.com>
- Add condition to only run on main repo when token is available - Move CODECOV_TOKEN from env to with.token parameter (preferred by codecov-action v5) - Prevents issues with fork PRs where secrets are unavailable Addresses Copilot feedback validated by @edeandrea in PR docling-project#406 Co-authored-by: Bob <bob@codeium.com> Signed-off-by: Rohan <rohan.kurian@ibm.com>
Enable prepare-test-reports job to run on both pull_request and push events. This ensures: - Baseline coverage is maintained on main branch - README badge stays current - PR comparisons have accurate base coverage - Historical coverage trends are tracked Implements ChatGPT recommendation and addresses Copilot feedback in PR docling-project#406 Co-authored-by: Bob <bob@codeium.com> Signed-off-by: Rohan <rohan.kurian@ibm.com>
Enable prepare-test-reports job to run on both pull_request and push events. This ensures: - Baseline coverage is maintained on main branch - README badge stays current - PR comparisons have accurate base coverage - Historical coverage trends are tracked Implements ChatGPT recommendation and addresses Copilot feedback in PR docling-project#406 Co-authored-by: Bob <bob@codeium.com> Signed-off-by: Rohan <rohan.kurian@ibm.com>
Configure separate coverage status checks for: - docling-core - docling-serve-api - docling-serve-client This provides granular visibility into coverage for each production module. Excludes docling-testcontainers and docling-testing as they are test infrastructure. Addresses @edeandrea feedback in PR docling-project#406 Co-authored-by: Bob <bob@codeium.com> Signed-off-by: Rohan <rohan.kurian@ibm.com>
Configure separate coverage status checks for: - docling-core - docling-serve-api - docling-serve-client This provides granular visibility into coverage for each production module. Excludes docling-testcontainers and docling-testing as they are test infrastructure. Addresses @edeandrea feedback in PR docling-project#406 Co-authored-by: Bob <bob@codeium.com> Signed-off-by: Rohan <rohan.kurian@ibm.com>
Create individual README files for each production module: - docling-core/README.md - docling-serve/docling-serve-api/README.md - docling-serve/docling-serve-client/README.md Each README includes: - Module-specific Codecov badge with flag parameter - Link to detailed coverage reports on Codecov This provides granular coverage visibility as requested by @edeandrea in PR docling-project#406 Co-authored-by: Bob <bob@codeium.com> Signed-off-by: Rohan <rohan.kurian@ibm.com>
Create individual README files for each production module: - docling-core/README.md - docling-serve/docling-serve-api/README.md - docling-serve/docling-serve-client/README.md Each README includes: - Module-specific Codecov badge with flag parameter - Link to detailed coverage reports on Codecov This provides granular coverage visibility as requested by @edeandrea in PR docling-project#406 Co-authored-by: Bob <bob@codeium.com> Signed-off-by: Rohan <rohan.kurian@ibm.com>
32dd927 to
1af0c33
Compare
…ecov.yml Signed-off-by: Eric Deandrea <eric.deandrea@ibm.com>
|
Thanks @rkmangal23 for this! Once the checks pass I will merge it. We can tune it afterwards if we need to. |
… Version Tests Signed-off-by: Eric Deandrea <eric.deandrea@ibm.com>
…199' into rkmangal23-codecov
Signed-off-by: Eric Deandrea <eric.deandrea@ibm.com>
Signed-off-by: Eric Deandrea <eric.deandrea@ibm.com>
|
HTML test reports are available as workflow artifacts (zipped HTML). • Download: Artifacts for this run |
This PR is for adding codeCov to the project. It works with jaCoCo reports. I tested it with push to my fork by changing the condition for prepare test report and used my token in the fork. For parent repo, separate token would need to be added as I see has been requested in the issue.
Have used Bob (IBM's code assistant)to help me in getting this done quickly. And it is listed in the commits with me (my product team has made changes to add a githook for this).
I could see a report like this in codecov.io

Fixes #199