Commit 30190c1
ci: onboard Codecov for unit test coverage tracking (#510)
## Summary
- Add `codecov/codecov-action@v5` to the PR workflow with OIDC
authentication (`use_oidc: true`) to upload JaCoCo coverage reports to
[app.codecov.io](https://app.codecov.io)
- Replace the `actions/upload-artifact` step with the Codecov upload
step, keeping the same matrix guard (`matrix.java == env.MAIN_JAVA_VER`)
- Add `id-token: write` permission at job level for OIDC token exchange
- Add `codecov.yml` with informational status checks, `unit-tests` flag
with carryforward enabled, and ignore patterns for test/resource/build
directories
## Details
The existing JaCoCo setup is already complete:
- Version 0.8.14 declared in `pluginManagement`
- `prepare-agent` and `check` goals in the main build plugins
- `report` goal in the `cov` profile (activated by `-Pcov`)
- Excludes configured for API model, exception, impl, and logging
packages
No changes to `pom.xml` were needed.
## Test plan
- [ ] Verify the PR workflow runs successfully and the Codecov step
uploads coverage
- [ ] Check that the Codecov status checks appear on the PR
(informational, non-blocking)
- [ ] Confirm coverage report is visible at
https://app.codecov.io/gh/guacsec/trustify-da-java-client
Ref: COVERPORT-253
## Summary by Sourcery
Integrate Codecov into the PR workflow to upload JaCoCo coverage for the
main Java version and configure repository-wide coverage reporting
behavior.
New Features:
- Introduce Codecov integration for tracking unit test coverage in the
repository.
Enhancements:
- Add a Codecov configuration file to define informational project and
patch status checks, a unit-test coverage flag with carryforward, and
directory ignore rules for coverage calculations.
CI:
- Update the PR GitHub Actions workflow to upload JaCoCo coverage to
Codecov using OIDC authentication for the main Java matrix entry.
- Grant id-token write permission in the PR workflow job to enable
OIDC-based authentication for Codecov uploads.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 3b9c5e2 commit 30190c1
2 files changed
Lines changed: 37 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | | - | |
| 70 | + | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
72 | 73 | | |
73 | | - | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments