Skip to content

Commit

Permalink
feat(build): grep from the cov file (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfalkowski authored Nov 22, 2023
1 parent dc59501 commit 8f484e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/make/go.mak
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.PHONY: vendor

COV=$(shell cat .go.cov)

download:
go mod download

Expand Down Expand Up @@ -31,7 +33,7 @@ specs:
go test -race -mod vendor -failfast -covermode=atomic -coverpkg=./... -coverprofile=test/reports/profile.cov ./...

remove-generated-coverage:
cat test/reports/profile.cov | grep -v "test" > test/reports/final.cov
cat test/reports/profile.cov | grep -Ev "${COV}" > test/reports/final.cov

# Get the HTML coverage for go.
html-coverage: remove-generated-coverage
Expand Down

0 comments on commit 8f484e7

Please sign in to comment.