Skip to content

Commit ec6e0e2

Browse files
Add tests coverage visibility
1 parent 93aaabb commit ec6e0e2

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
PACKAGES ?= "$(shell go list ./... | grep -v tests)"
22

33
test:
4-
@go test -race $(shell echo $(PACKAGES))
4+
@go test ./... -coverprofile=coverage.out.tmp
5+
cat coverage.out.tmp | grep -v "/mocks/" > coverage.out
6+
@go tool cover -func=coverage.out
7+
8+
local-coverage: test
9+
@go tool cover -html=coverage.out -o coverage.html
10+
@echo "\n\n open the coverage.html on your browser !!!"
511

612
lint:
713
@golangci-lint run

0 commit comments

Comments
 (0)