Repository navigation
Add a code coverage badge fed by the Build workflow - #148
Merged
Merged
Conversation
Co-authored-by: derobins <43805+derobins@users.noreply.github.com>
Co-authored-by: derobins <43805+derobins@users.noreply.github.com>
derobins
marked this pull request as ready for review
October 8, 2026 22:03
derobins
requested review from
akolliasAMD,
derobins,
gaoikawa,
jordan-turbofish,
kurtmcmillan,
riley-dixon,
sbates130272 and
zbyrne
as code owners
October 8, 2026 22:03
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The badge publication is appropriately validated, scoped, and isolated from repository code execution.
0 open findings
What changed in this PR
Adds a README coverage badge backed by the Build workflow’s successful develop coverage results.
Changes:
- Generates and uploads validated Shields-compatible coverage JSON.
- Publishes the artifact to an orphan
badgesbranch. - Documents and displays the coverage badge.
| File | Description |
|---|---|
.github/workflows/hipobject-build.yml |
Generates, uploads, and publishes badge data. |
README.md |
Adds the coverage badge. |
AGENTS.md |
Documents coverage publication behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a README badge that shows the library's line coverage from the Build workflow's coverage job.
Changes
hipobject-build.yml): the existingawkgate also writesbuild/coverage/coverage.json, the input file for a shields.io endpoint badge. A coverage value that isn't a plain number now fails the step.{"schemaVersion":1,"label":"coverage","message":"90.17%","color":"brightgreen"}brightgreenat 90% or above andyellowgreenotherwise. Below 80% the job fails, so that value is never published.coverage-badgeartifact, and only ondevelop(push orworkflow_dispatch), never on PRs.publish-coverage-badgejob:build(every matrix job must pass), ondeveloponly, with job-levelcontents: write. It runs no repository code; it only copies the artifact, the same split ashipobject-documentation-deploy.yml.coverage.jsonto thebadgesbranch, so the branch never grows. The first run creates it.raw.githubusercontent.com/ROCm/hipObject/badges/coverage.jsonthroughimg.shields.io/endpointand linking to the Build workflow.Review notes
badges. If a ruleset covers all branches, it needs an exception.developrun where every build configuration passed. A failed or below-target run leaves the previous value in place.developpushes close together can finish in either order, so the badge can briefly show the older commit's number. The next push corrects it.