More coverage report setup.
This commit is contained in:
parent
831b5ea762
commit
23c6092aa6
3 changed files with 40 additions and 28 deletions
11
Makefile
11
Makefile
|
@ -16,3 +16,14 @@ test:
|
|||
|
||||
dev:
|
||||
go tool air -build.stop_on_error "true"
|
||||
|
||||
coverage:
|
||||
go build -cover -o webapp
|
||||
mkdir -p .coverage
|
||||
echo "GOCOVERDIR=.coverage ./webapp"
|
||||
|
||||
cover_report:
|
||||
go tool covdata textfmt -i=.coverage -o coverage.txt
|
||||
go tool cover -func=coverage.txt
|
||||
go tool cover -html=coverage.txt -o coverage.html
|
||||
open coverage.html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue