aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 26fbcfa..4a9bba4 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ VERSION=0.3
BUILD=`git rev-parse HEAD`
LDFLAGS=-ldflags "-X main.Version=${VERSION} -X main.Build=${BUILD}"
-.PHONY: default all clean ui build install test test-race test-frontend test-e2e ui-check lint check ci run dev docs install-hooks
+.PHONY: default all clean ui build install test test-race test-frontend test-e2e ui-check lint check ci run dev docs install-hooks cover coverage-html
default: build
@@ -32,12 +32,19 @@ install: build
cp ${BINARY} ${GOBIN}
test:
- ${GO} test ./...
+ ${GO} test -cover ./...
cd frontend && ${NPM} test -- --run
test-race:
${GO} test -race ./...
+cover:
+ ${GO} test -coverprofile=coverage.out ./...
+ ${GO} tool cover -func=coverage.out
+
+coverage-html: cover
+ ${GO} tool cover -html=coverage.out
+
test-frontend:
cd frontend && ${NPM} run lint
cd frontend && ${NPM} test -- --run