Skip to content

ci: upload Go coverage to Codecov - #126

Open
karngyan wants to merge 1 commit into
mainfrom
codecov-coverage
Open

ci: upload Go coverage to Codecov#126
karngyan wants to merge 1 commit into
mainfrom
codecov-coverage

Conversation

@karngyan

Copy link
Copy Markdown
Contributor

Adds Go coverage reporting to CI and a Codecov badge to the README.

What changed

  • Makefile: test-go now runs go test $(GOTESTFLAGS) ./.... Local make test behaviour is unchanged since the variable defaults to empty.
  • ci.yml: the existing make lint test invocation passes GOTESTFLAGS="-coverprofile=coverage.out -covermode=atomic", and a new step uploads the profile with codecov/codecov-action@v5.
  • Auth is GitHub OIDC (use_oidc: true plus id-token: write), so no CODECOV_TOKEN secret is required for a public repo.
  • fail_ci_if_error stays at its default of false, so a Codecov outage cannot fail the build, matching the bar the shellcheck guard step already holds.
  • README gets the Codecov badge next to the CI badge, and .gitignore learns about coverage.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

  • The badge will read "unknown" until the first upload from main lands, which happens on merge because ci.yml also runs on push to main.
  • Follow-up candidates, not in this PR: vitest coverage for web/ and relay/, 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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant