ci: upload Go coverage to Codecov - #126
Open
karngyan wants to merge 1 commit into
Open
Conversation
test-go gains a GOTESTFLAGS passthrough so CI can ask for a coverage profile without changing the local default. The upload authenticates over GitHub OIDC, so no CODECOV_TOKEN secret is needed for this public repo, and a Codecov outage cannot fail the build. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 Go coverage reporting to CI and a Codecov badge to the README.
What changed
Makefile:test-gonow runsgo test $(GOTESTFLAGS) ./.... Localmake testbehaviour is unchanged since the variable defaults to empty.ci.yml: the existingmake lint testinvocation passesGOTESTFLAGS="-coverprofile=coverage.out -covermode=atomic", and a new step uploads the profile withcodecov/codecov-action@v5.use_oidc: trueplusid-token: write), so noCODECOV_TOKENsecret is required for a public repo.fail_ci_if_errorstays at its default of false, so a Codecov outage cannot fail the build, matching the bar the shellcheck guard step already holds..gitignorelearns aboutcoverage.out.Verified
make test-go GOTESTFLAGS="-coverprofile=coverage.out -covermode=atomic"passes locally, all 18 Go packages green, and writes a valid profile. Most packages sit between 70 and 97 percent; overall coverage lands around 80 percent.Notes
mainlands, which happens on merge becauseci.ymlalso runs on push tomain.web/andrelay/, and wiring the badge into the awesome-go and homebrew-core credibility items tracked in Get flue into homebrew-core (brew install flue) #123.🤖 Generated with Claude Code