CMP-4409: Add per-package coverage tracking to make test-unit#1289
CMP-4409: Add per-package coverage tracking to make test-unit#1289rhmdnd wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhmdnd The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@rhmdnd: This pull request references CMP-4409 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
🤖 To deploy this PR, run the following command: |
657c6df to
cf990f9
Compare
|
🤖 To deploy this PR, run the following command: |
|
@rhmdnd: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Adds a coverage ratchet to the unit test workflow: make test-unit now runs with -cover, captures native go test per-package coverage output, and compares it against a committed baseline. The coverage check fails if any package regresses below the baseline or if coverage has improved and the baseline is out of date, ensuring it stays current. New files: - hack/check-coverage.sh: parses go test output (plain and JSON formats) and compares per-package coverage against the baseline - hack/update-coverage-baseline.sh: generates the baseline from go test output - coverage-baseline.txt: committed baseline with current per-package coverage percentages Makefile changes: - test-unit captures output via tee and runs check-coverage if a baseline exists - New update-coverage-baseline and check-coverage targets - TESTABLE_PKGS filters to packages with test files to avoid go 1.25 covdata tool errors on empty packages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cf990f9 to
e99d22f
Compare
|
🤖 To deploy this PR, run the following command: |
Adds a coverage ratchet to the unit test workflow: make test-unit now
runs with -cover, captures native go test per-package coverage output,
and compares it against a committed baseline. The coverage check fails
if any package regresses below the baseline or if coverage has improved
and the baseline is out of date, ensuring it stays current.
New files:
formats) and compares per-package coverage against the baseline
go test output
coverage percentages
Makefile changes:
baseline exists
go 1.25 covdata tool errors on empty packages
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com