ci(tenant-registry): drop store from go-test, keep it in -coverpkg
go: no such tool 'covdata' fires when go test tries to build a test binary for a package with zero _test.go files under -coverpkg. The store package has no tests of its own (exercised via the server harness); excluding it from the test command sidesteps the error while -coverpkg still counts its coverage from server-side exercise. Refs: M4.2
This commit is contained in:
@@ -77,12 +77,13 @@ jobs:
|
||||
with: { version: v2.12.2 }
|
||||
|
||||
- name: test
|
||||
# Coverage scoped to ./internal/... — cmd/server is the entrypoint
|
||||
# with signal-handling + bind that isn't worth unit-testing.
|
||||
# -coverpkg lets the server tests count their exercise of store/* —
|
||||
# store has no test files because every method is exercised end-to-end
|
||||
# via the server's eachStore harness against both Memory and Postgres.
|
||||
run: go test -race -coverpkg=./internal/... -coverprofile=cover.out ./internal/...
|
||||
# Test runs the packages that HAVE test files (server, config). The
|
||||
# store package is exercised end-to-end via the server's eachStore
|
||||
# harness against both Memory and Postgres, so we don't need its
|
||||
# own test binary — and including it triggers a covdata-tool error
|
||||
# on packages with no _test.go files. -coverpkg makes the server's
|
||||
# exercise of store/* count toward coverage.
|
||||
run: go test -race -coverpkg=./internal/... -coverprofile=cover.out ./internal/server/... ./internal/config/...
|
||||
|
||||
- name: coverage gate
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user