File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 - name : Run unit tests with coverage
5252 run : |
5353 mkdir -p test-results
54- go test -v -race -coverprofile=test-results/coverage.out -covermode=atomic -coverpkg=./internal/...,./pkg/...,./cmd/... -timeout=5m ./tests/unit/... ./internal/... ./pkg/...
54+ # Run each test path separately to avoid coverprofile "File exists" conflicts
55+ go test -v -race -coverprofile=test-results/unit.out -covermode=atomic -coverpkg=./internal/...,./pkg/...,./cmd/... -timeout=5m ./tests/unit/...
56+ go test -v -race -coverprofile=test-results/internal.out -covermode=atomic -coverpkg=./internal/...,./pkg/...,./cmd/... -timeout=5m ./internal/...
57+ go test -v -race -coverprofile=test-results/pkg.out -covermode=atomic -coverpkg=./internal/...,./pkg/...,./cmd/... -timeout=5m ./pkg/...
58+ # Merge coverage profiles
59+ head -1 test-results/unit.out > test-results/coverage.out
60+ tail -n +2 -q test-results/unit.out test-results/internal.out test-results/pkg.out >> test-results/coverage.out
5561 echo "✅ Unit tests completed"
5662
5763 - name : Check test coverage
You can’t perform that action at this time.
0 commit comments