-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
asc-parityFeature parity with ASC CLIFeature parity with ASC CLItestingTesting infrastructureTesting infrastructure
Milestone
Description
Summary
Add test coverage reporting to the CI pipeline so developers and reviewers can track test coverage over time. Coverage reports should be generated on every PR, uploaded as artifacts, and optionally displayed as a badge in the README.
Implementation Plan
- Add
make test-coveragetarget toMakefile:test-coverage: go test -coverprofile=coverage.out -covermode=atomic ./... go tool cover -html=coverage.out -o coverage.html go tool cover -func=coverage.out
- Update
.github/workflows/pr-checks.yml:- Replace
make testwithmake test-coverage(or add as separate step) - Upload
coverage.outandcoverage.htmlas GitHub Actions artifacts - Print coverage summary in job output
- Replace
- Add
.gitignoreentries for coverage files:coverage.outcoverage.html
- Optional — Coverage badge:
- Integrate with Codecov or Coveralls for automatic badge generation
- Add badge to README.md:
[](coverage-url)
- Optional — Coverage threshold enforcement:
- Add a step that parses
coverage.outand fails if total coverage drops below a threshold (e.g., 50%) - Use a simple Go script or shell command to extract the total percentage
- Add a step that parses
- Add
make test-coverage-viewfor local development:test-coverage-view: test-coverage open coverage.html
Files to Create/Modify
- Modify:
Makefile(add test-coverage, test-coverage-view targets) - Modify:
.github/workflows/pr-checks.yml(add coverage step, artifact upload) - Modify:
.gitignore(add coverage.out, coverage.html) - Modify (optional):
README.md(add coverage badge)
Acceptance Criteria
-
make test-coveragegeneratescoverage.outandcoverage.html -
make test-coverageprints function-level coverage summary to stdout - CI uploads coverage report as a downloadable artifact on every PR
- Coverage files are in
.gitignore - Coverage report is viewable locally with
make test-coverage-view - (Optional) Coverage badge displays in README
- (Optional) CI fails if coverage drops below configured threshold
ASC Reference
ASC CLI tracks test coverage in CI and uses it to maintain quality standards. Coverage reports help identify untested code paths and ensure new features include adequate tests. The gplay CLI should adopt similar practices to maintain code quality as the project grows.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
asc-parityFeature parity with ASC CLIFeature parity with ASC CLItestingTesting infrastructureTesting infrastructure