Conversation
awesome-go asks a submission for a link to a coverage report, and there was none to give: the number existed only in a CI log. The profile the test step already writes is uploaded now, so the badge is the library's real coverage and the link is somewhere to read it. It covers di, dihttp and dislog. examples/ and benchmarks/ are separate modules and not part of the library's number, which is what the split bought. The upload runs with fail_ci_if_error: false. An outage at Codecov is not a reason to fail a build, so a missing report is a stale badge and never a red gate. The badge stays unknown until the repository is activated at codecov.io and the first upload from main lands.
Codecov could not be activated -- its login returns 403 -- so the badge the previous commit added would have read unknown forever. awesome-go's own COVERAGE.md suggests tj-actions/coverage-badge-go instead, which rewrites the README from CI and commits it back to main on every push; that bypasses the pull-request process this repo otherwise follows, and adds a dependency on an action whose sibling was compromised last year. So the report goes where this repo already publishes: pages.yml writes go tool cover -html and a shields endpoint JSON into site/build after the site is built and before the artifact is uploaded, and the badge in the README points at both. The report and the badge are one deploy and cannot disagree, there is nothing to log into, and no CI job commits to main. The site's path filter gains **/*.go, because coverage moves when the library or its tests do. That is the thing to remember when the badge looks stale: it is documented in CLAUDE.md and in site/README.md, whose count of things worth knowing goes to eight. The colour thresholds were checked under bash -e, which is the shell Actions uses: an awk && color= chain aborts the step if the failing awk is not in the position bash exempts. Five coverage figures were run through it, and each picks its colour and reaches the end.
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.
awesome-go asks a submission for a link to a coverage report, and there was
none to give: the number existed only in a CI log.
Codecov turned out to be a dead end — its login returns 403 — so the first
commit here is superseded by the second. awesome-go's own
COVERAGE.mdsuggests
tj-actions/coverage-badge-go, which rewrites the README from CI andcommits it back to
mainon every push; that bypasses the pull-requestprocess this repo otherwise follows, and adds a dependency on an action whose
sibling was compromised last year.
So the report goes where this repo already publishes.
pages.ymlwritesgo tool cover -htmland a shields endpoint JSON intosite/buildafter thesite is built and before the artifact is uploaded:
https://img.shields.io/endpoint?url=…/di/coverage.jsonThe report and the badge are one deploy and cannot disagree, there is nothing
to log into, and no CI job commits to
main. It coversdi,dihttpanddislog—examples/andbenchmarks/are separate modules and not part ofthe library's number, which is 97.6% of statements locally.
The site's path filter gains
**/*.go, because coverage moves when thelibrary or its tests do, so a Go change now deploys the site. That is the
thing to remember when the badge looks stale, and it is written down in both
CLAUDE.mdandsite/README.md— whose count of things worth knowing goesto eight.
The colour thresholds were checked under
bash -e, the shell Actions uses:an
awk … && color=…chain aborts the step if the failingawklandsoutside the position bash exempts. Five coverage figures were run through it,
and each picks its colour and reaches the end.
No library change, so no CHANGELOG entry.