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
2727compile-linux : ensure-out-dir # # compiles kube-tmuxp for linux
2828 GOOS=linux GOARCH=amd64 $(GOBIN ) build -o $(APP_EXECUTABLE ) ./main.go
2929
30- fmt : # format go code
30+ fmt : # # format go code
3131 $(GOBIN ) fmt $(SRC_PACKAGES )
3232
33- vet : # examine go code for suspicious constructs
33+ vet : # # examine go code for suspicious constructs
3434 $(GOBIN ) vet $(SRC_PACKAGES )
3535
3636setup : # # setup environment
@@ -42,3 +42,13 @@ build: fmt vet compile ## build the application
4242
4343mocks : # # generate mocks for testing
4444 ./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