Merge pull request #533 from chrisallenlane/master

chore: creates `make coverage` target
This commit is contained in:
Chris Allen Lane 2020-01-31 14:07:20 -05:00 committed by GitHub
commit ef7a41f9a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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