test: improve render coverage from 78.5% to 84.5%#65
Conversation
There was a problem hiding this comment.
Pull request overview
This PR increases test coverage for the render/ skyline visualization by adding new tests that exercise additional Skyline title behavior and more animationModel update/view branches, and it raises the CI-enforced overall Go coverage floor accordingly.
Changes:
- Add helper(s) and new test cases in
render/skyline_test.goto cover additionalSkylineandanimationModelbranches (including phase transitions and shooting star rendering). - Bump the CI coverage floor from
45.0to50.0in the GitHub Actions workflow.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| render/skyline_test.go | Adds additional unit tests (and an ANSI-stripping helper) to increase coverage for skyline rendering and animation state transitions. |
| .github/workflows/ci.yml | Raises the enforced total coverage minimum to 50.0% in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: | | ||
| total=$(go tool cover -func=coverage.out | awk '/^total:/ {gsub("%","",$3); print $3}') | ||
| # Current enforced coverage floor. Codex PRs raise this incrementally toward 90%. | ||
| min=45.0 | ||
| min=50.0 | ||
| awk -v t="$total" -v m="$min" 'BEGIN { |
There was a problem hiding this comment.
Coverage floor was bumped to 50.0, but the coverage badge step still uses minColorRange: 45 later in this workflow. Consider updating the badge range to match the new enforced floor to avoid confusing badge colors vs. CI enforcement.
What does this PR do?
Improve
render/test coverage by exercising additionalSkylineandanimationModelbranches, and raise the CI coverage floor because total coverage is now comfortably above the current threshold.Type of change
Coverage
render/Validation
go test -race -coverprofile=coverage.out ./...go vet ./...gofmt -l .45.0to50.0Additional notes
This PR adds 144 lines of test code in
render/skyline_test.goand updates the CI coverage floor in.github/workflows/ci.yml.