mirror of
https://github.com/thegeeklab/git-sv.git
synced 2024-11-24 11:10:39 +00:00
chore: add test-coverage and test-show-coverage tasks to makefile
This commit is contained in:
parent
a8139b4b26
commit
8c266a5a20
12
Makefile
12
Makefile
@ -1,4 +1,4 @@
|
||||
.PHONY: usage build test run tidy release release-all
|
||||
.PHONY: usage build test test-coverage test-show-coverage run tidy release release-all
|
||||
|
||||
OK_COLOR=\033[32;01m
|
||||
NO_COLOR=\033[0m
|
||||
@ -35,6 +35,16 @@ test:
|
||||
@echo $(ECHOFLAGS) "$(OK_COLOR)==> Running tests...$(NO_COLOR)"
|
||||
@go test $(PKGS)
|
||||
|
||||
## test-coverage: run tests with coverage
|
||||
test-coverage:
|
||||
@echo $(ECHOFLAGS) "$(OK_COLOR)==> Running tests with coverage...$(NO_COLOR)"
|
||||
@go test -race -covermode=atomic -coverprofile coverage.out ./...
|
||||
|
||||
## test-show-coverage: show coverage
|
||||
test-show-coverage: test-coverage
|
||||
@echo $(ECHOFLAGS) "$(OK_COLOR)==> Show test coverage...$(NO_COLOR)"
|
||||
@go tool cover -html coverage.out
|
||||
|
||||
## run: run git-sv
|
||||
run:
|
||||
@echo $(ECHOFLAGS) "$(OK_COLOR)==> Running bin/$(BUILDOS)_$(BUILDARCH)/$(BIN)...$(NO_COLOR)"
|
||||
|
Loading…
Reference in New Issue
Block a user