File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ compile: ensure-out-dir ## compiles kube-tmuxp for this platform
27
27
compile-linux : ensure-out-dir # # compiles kube-tmuxp for linux
28
28
GOOS=linux GOARCH=amd64 $(GOBIN ) build -o $(APP_EXECUTABLE ) ./main.go
29
29
30
- fmt : # format go code
30
+ fmt : # # format go code
31
31
$(GOBIN ) fmt $(SRC_PACKAGES )
32
32
33
- vet : # examine go code for suspicious constructs
33
+ vet : # # examine go code for suspicious constructs
34
34
$(GOBIN ) vet $(SRC_PACKAGES )
35
35
36
36
setup : # # setup environment
@@ -42,3 +42,13 @@ build: fmt vet compile ## build the application
42
42
43
43
mocks : # # generate mocks for testing
44
44
./scripts/mocks
45
+
46
+ tests : # # run all tests
47
+ $(GOBIN ) test $(SRC_PACKAGES ) -p=1 -coverprofile ./out/coverage -v
48
+
49
+ tests-cover-html : ensure-out-dir # # run all tests and generates coverage report in html
50
+ @echo " mode: count" > out/coverage-all.out
51
+ $(foreach pkg, $(SRC_PACKAGES ) ,\
52
+ $(GOBIN ) test -coverprofile=out/coverage.out -covermode=count $(pkg ) ; \
53
+ tail -n +2 out/coverage.out >> out/coverage-all.out; )
54
+ $(GOBIN ) tool cover -html=out/coverage-all.out -o out/coverage.html
You can’t perform that action at this time.
0 commit comments