Skip to content

Commit 7f43e7d

Browse files
committed
Exclude cmd/ and examples/ from test coverage calculation
Coverage should only measure library code (pkg/ and root), not command-line tools and example programs. This brings coverage back to ~96% for the library.
1 parent b21d02f commit 7f43e7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: go mod verify
3434

3535
- name: Run tests
36-
run: go test -v -race -coverprofile=coverage.out ./...
36+
run: go test -v -race -coverprofile=coverage.out $(go list ./... | grep -v '/cmd/' | grep -v '/examples/')
3737

3838
- name: Check coverage
3939
run: |

0 commit comments

Comments
 (0)