mirror of
https://github.com/cheat/cheat.git
synced 2024-12-22 04:35:06 +01:00
chore: creates make coverage
target
Creates a `make coverage` target that generates a unit-testing coverage report.
This commit is contained in:
parent
a59c019642
commit
008316d030
7
Makefile
7
Makefile
@ -21,6 +21,7 @@ ZIP := zip -m
|
||||
# build flags
|
||||
BUILD_FLAGS := -ldflags="-s -w" -mod vendor -trimpath
|
||||
GOBIN :=
|
||||
TMPDIR := /tmp
|
||||
|
||||
# release binaries
|
||||
releases := \
|
||||
@ -137,6 +138,12 @@ vet:
|
||||
test:
|
||||
$(GO) test ./...
|
||||
|
||||
## coverage: generates a test coverage report
|
||||
.PHONY: coverage
|
||||
coverage:
|
||||
$(GO) test ./... -coverprofile=$(TMPDIR)/cheat-coverage.out && \
|
||||
$(GO) tool cover -html=$(TMPDIR)/cheat-coverage.out
|
||||
|
||||
## check: formats, lints, vets, vendors, and run unit-tests
|
||||
.PHONY: check
|
||||
check: | vendor fmt lint vet test
|
||||
|
Loading…
Reference in New Issue
Block a user