Skip to content

ci: 90% coverage gate on PRs + pushes to main - #1

Merged
WiktorStarczewski merged 1 commit into
mainfrom
ci/coverage-gate
Apr 23, 2026
Merged

WiktorStarczewski merged 1 commit into
mainfrom
ci/coverage-gate

Conversation

@WiktorStarczewski

Copy link
Copy Markdown
Owner

Summary

  • New GitHub Actions workflow .github/workflows/ci.yml runs build + vet + go test -race -coverpkg=./... -coverprofile=… on Ubuntu.
  • Fails the job if aggregate line coverage drops below 90%.
  • Uploads the coverage profile as an artifact for post-hoc inspection.

One follow-on fix: the seedConfig test helper now resolves the config dir via internal/config.Dir() instead of hard-coding the macOS path, so the cmd/hearsay tests pass on Linux runners (which use the XDG fallback).

This PR is the first run that produces the ci / test status check — once it lands and is green, branch protection on main can key off of it.

Test plan

  • CI workflow passes on this PR
  • After merge, enable branch protection requiring ci / test

GitHub Actions workflow runs go build/vet/test -race on Ubuntu and
fails the job if aggregate line coverage (via -coverpkg=./...) drops
below 90%. Coverage profile is uploaded as an artifact so individual
runs can be inspected after the fact.

Test helper fix: seedConfig now resolves the config dir via
internal/config.Dir() instead of hard-coding the macOS path, so the
cmd/hearsay tests pass on Linux runners (XDG fallback path).
@WiktorStarczewski
WiktorStarczewski merged commit 1a33273 into main Apr 23, 2026
1 check passed
@WiktorStarczewski
WiktorStarczewski deleted the ci/coverage-gate branch April 23, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant