Repository navigation
ci: coverage reporting (go test -coverprofile to Codecov + step summary) - #61
Merged
Merged
Conversation
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.
Summary
Closes #51.
Introduces automated test coverage reporting in CI and local developer workflows:
go test -race -coverprofile=coverage.out -covermode=atomic ./...).$GITHUB_STEP_SUMMARY).codecov/codecov-action@v5(non-blocking if secret is absent).actions/upload-artifact@v4).make test-coverageandmake coverage-html).What changed
GitHub Actions Workflow (
.github/workflows/ci.yml):go test -race ./...with atomic coverprofile generation../scripts/coverage-summary.sh coverage.outstep to emit a clean Markdown summary table into$GITHUB_STEP_SUMMARY.codecov/codecov-action@v5step withfail_ci_if_error: false.actions/upload-artifact@v4step archivingcoverage.outandcoverage.html(14 days retention).Portable Summary Script (
scripts/coverage-summary.sh):$GITHUB_STEP_SUMMARYin CI, prints to stdout for local execution.Makefile & Tooling (
Makefile,.gitignore):make test-coverage(runs tests with coverprofile and displays report).make coverage-html(generates browser-viewablecoverage.html).coverage.htmlto.gitignore.Documentation (
CONTRIBUTING.md,docs/BACKLOG.md):make test-coverageandmake coverage-htmlinCONTRIBUTING.md.docs/BACKLOG.md.Verification
make test-coverage: PASS (100% tests pass with race detector, overall statement coverage: 68.2%)make lint(go vet ./...+golangci-lint run ./...): PASS (0 issues)make build: PASS./mctf -C examples/sample-event validate: PASS./mctf -C examples/sample-event generate --check: PASS