Skip to content

Commit

Permalink
add test coverage html output
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed May 24, 2022
1 parent 8db70d2 commit 5222a50
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ test\:coverage-full: deps\:coverage
go-acc ./... --output=coverage-full.txt --covermode=atomic
go tool cover -func coverage-full.txt | grep total | awk '{print $$3}'

.PHONY: test\:coverage-html
test\:coverage-html:
go test -v $(path) -race -coverprofile=coverage.out
go tool cover -html=coverage.out
rm ./coverage.out

# This only covers how much of the package is tested by itself (unit test).
.PHONY: test\:coverage-quick
test\:coverage-quick:
Expand Down Expand Up @@ -125,4 +131,4 @@ lint\:list:

.PHONY: chglog
chglog:
git-chglog -c "tools/configs/chglog/config.yml" --next-tag v0.x.0 -o CHANGELOG.md
git-chglog -c "tools/configs/chglog/config.yml" --next-tag v0.x.0 -o CHANGELOG.md

0 comments on commit 5222a50

Please sign in to comment.