You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Run unit tests on Windows and macOS in CI; track coverage; make test lacks -race #170
Unit tests run only on Ubuntu in CI, no coverage is recorded, and make test does not pass -race although README and CONTRIBUTING say it does. The project ships Windows and macOS binaries whose platform-specific code is only smoke-tested through the composite action.
Where
.github/workflows/go.yml:15, 21, 70 (build on ubuntu-latest, Go-version matrix only, go test -v -race ./...)
.github/workflows/go.yml:109 (3-OS matrix runs only the action)
Makefile:38-42 (test target without -race), README.md:238
Details
Platform-sensitive paths (rename over an existing file on Windows, signal handling, path separators) have no Windows or macOS test run. Locally on Windows the suite needs GOTOOLCHAIN=go1.26.3 to avoid a known false -race failure, which CI never surfaces. Measured total coverage is 79.8% with internal/output at 51% and internal/dnsserver at 55%, but nothing tracks it.
Suggested fix
Add go test ./... (optionally -short) to the action job's OS matrix, or add an os axis to build
Add internal/output/file_windows_test.go: CreateFile over an existing locked file returns a clear error; Close when the target was deleted mid-write; rename-over-existing keeps the old file on failure
Emit -coverprofile in CI and upload it as an artifact; fail below a floor (start at 75%)
Make make test pass -race or correct README.md:238 and docs/CONTRIBUTING.md
Fixed in 09dbd54: a new test-os job runs go test -shuffle=on ./... on macos-latest and windows-latest; the stable build leg writes coverage.out, reports the total in the step summary, uploads it as an artifact and fails below 75% (85.0% now). make test keeps no -race, and README/CONTRIBUTING now say CI adds it. Verified by CI run 42621021843: every job green, including both test-os legs. Not done: the optional file_windows_test.go cases from the suggestions.
Activity
TMHSDigital commentedon Nov 9, 2026
Fixed in 09dbd54: a new test-os job runs
go test -shuffle=on ./...on macos-latest and windows-latest; the stable build leg writes coverage.out, reports the total in the step summary, uploads it as an artifact and fails below 75% (85.0% now).make testkeeps no -race, and README/CONTRIBUTING now say CI adds it. Verified by CI run 42621021843: every job green, including both test-os legs. Not done: the optionalfile_windows_test.gocases from the suggestions.ci: run unit tests on macOS and Windows; record coverage (TMHSDigital…