mirror of https://github.com/cheat/cheat.git
Merge pull request #533 from chrisallenlane/master
chore: creates `make coverage` target
This commit is contained in:
commit
ef7a41f9a9
7
Makefile
7
Makefile
|
@ -21,6 +21,7 @@ ZIP := zip -m
|
||||||
# build flags
|
# build flags
|
||||||
BUILD_FLAGS := -ldflags="-s -w" -mod vendor -trimpath
|
BUILD_FLAGS := -ldflags="-s -w" -mod vendor -trimpath
|
||||||
GOBIN :=
|
GOBIN :=
|
||||||
|
TMPDIR := /tmp
|
||||||
|
|
||||||
# release binaries
|
# release binaries
|
||||||
releases := \
|
releases := \
|
||||||
|
@ -137,6 +138,12 @@ vet:
|
||||||
test:
|
test:
|
||||||
$(GO) 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
|
## check: formats, lints, vets, vendors, and run unit-tests
|
||||||
.PHONY: check
|
.PHONY: check
|
||||||
check: | vendor fmt lint vet test
|
check: | vendor fmt lint vet test
|
||||||
|
|
Loading…
Reference in New Issue