Add cover tasks to test code coverage
This commit is contained in:
parent
8db6f722d2
commit
e60a614a37
8
Makefile
8
Makefile
|
@ -40,6 +40,14 @@ updatedeps:
|
||||||
| sort -u \
|
| sort -u \
|
||||||
| xargs go get -f -u -v
|
| xargs go get -f -u -v
|
||||||
|
|
||||||
|
cover:
|
||||||
|
@go tool cover 2>/dev/null; if [ $$? -eq 3 ]; then \
|
||||||
|
go get -u golang.org/x/tools/cmd/cover; \
|
||||||
|
fi
|
||||||
|
go test $(TEST) -coverprofile=coverage.out
|
||||||
|
go tool cover -html=coverage.out
|
||||||
|
rm coverage.out
|
||||||
|
|
||||||
# vet runs the Go source code static analysis tool `vet` to find
|
# vet runs the Go source code static analysis tool `vet` to find
|
||||||
# any common errors.
|
# any common errors.
|
||||||
vet:
|
vet:
|
||||||
|
|
Loading…
Reference in New Issue