Skip to content

Add test coverage reporting with Codecov #88

Description

@osteele

Description

Add test coverage reporting to CI workflow using Codecov, similar to the liquid project's implementation.

Benefits

  • Track test coverage trends over time
  • Identify untested code paths
  • Prevent coverage regressions in PRs
  • Visualize coverage with badges

Implementation

Add a new coverage job to .github/workflows/go.yml that:

  1. Runs after tests pass
  2. Only runs on pushes (not PRs to avoid duplicate runs)
  3. Generates coverage report with go test -coverprofile=coverage.out ./...
  4. Uploads to Codecov using codecov/codecov-action@v4
  5. Set fail_ci_if_error: false to not block on Codecov issues

Reference

See liquid project's coverage job: https://github.com/osteele/liquid/blob/main/.github/workflows/go.yml#L40-L66

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions