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:
- Runs after tests pass
- Only runs on pushes (not PRs to avoid duplicate runs)
- Generates coverage report with
go test -coverprofile=coverage.out ./...
- Uploads to Codecov using
codecov/codecov-action@v4
- 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
Description
Add test coverage reporting to CI workflow using Codecov, similar to the liquid project's implementation.
Benefits
Implementation
Add a new
coveragejob to.github/workflows/go.ymlthat:go test -coverprofile=coverage.out ./...codecov/codecov-action@v4fail_ci_if_error: falseto not block on Codecov issuesReference
See liquid project's coverage job: https://github.com/osteele/liquid/blob/main/.github/workflows/go.yml#L40-L66