Skip to content

Commit ffada95

Browse files
committed
fix: update test commands to exclude examples directory in coverage reports
1 parent b41a5db commit ffada95

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
go-version: '1.24'
1818

1919
- name: Run coverage
20-
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
20+
run: go test -race -coverprofile=coverage.txt -covermode=atomic $(go list ./... | grep -v /examples/)
2121

2222
- name: Upload coverage to Codecov
2323
uses: codecov/codecov-action@v5

.github/workflows/go-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: go vet ./...
3535

3636
- name: Test
37-
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
37+
run: go test -race -coverprofile=coverage.txt -covermode=atomic $(go list ./... | grep -v /examples/)
3838

3939
- name: Upload coverage to Codecov
4040
uses: codecov/codecov-action@v5

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
go-version: '1.24'
2424

2525
- name: Run Tests
26-
run: go test -v ./...
26+
run: go test -v $(go list ./... | grep -v /examples/)
2727

2828
- name: Create Release
2929
id: create_release

0 commit comments

Comments
 (0)