Skip to content

Commit 3a02507

Browse files
committed
cover: remove example directory from code coverage
Remove example directory from code coverage explicitly since after #26 it started being considered on the code coverage report and we don't want that.
1 parent b5852d6 commit 3a02507

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/go.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@ jobs:
2828

2929
- name: Test
3030
# TODO(henvic): Skip generating code coverage when not sending it to Coveralls to speed up testing.
31+
# Remove example directory from code coverage explicitly since after #26 it
32+
# started being considered on the code coverage report and we don't want that.
3133
continue-on-error: ${{ matrix.os != 'ubuntu-latest' || matrix.go != '1.23.x' }}
32-
run: go test -race -covermode atomic -coverprofile=profile.cov ./...
34+
run: |
35+
go test -race -covermode atomic -coverprofile=profile.cov ./...
36+
sed -i '/^github\.com\/henvic\/httpretty\/example\//d' profile.cov
3337
3438
- name: Code coverage
3539
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go == '1.23.x' }}

0 commit comments

Comments
 (0)