add coveralls test coverage stats

This commit is contained in:
Jeff
2019-11-21 21:07:35 +08:00
committed by zryfish
parent 97ea468121
commit 36bcfdcd99
2 changed files with 6 additions and 2 deletions

View File

@@ -23,7 +23,11 @@ before_script:
script:
- diff -u <(echo -n) <(gofmt -d ./pkg ./cmd ./tools)
- make openapi
- make all
- make all && $HOME/gopath/bin/goveralls -coverprofile=cover.out -service=travis-ci -repotoken $COVERALLS_TOKEN
install:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
deploy:
skip_cleanup: true

View File

@@ -98,7 +98,7 @@ docker-build: all
# Run tests
test: fmt vet
export KUBEBUILDER_CONTROLPLANE_START_TIMEOUT=1m; go test ./pkg/... ./cmd/... -coverprofile cover.out
export KUBEBUILDER_CONTROLPLANE_START_TIMEOUT=1m; go test -v ./pkg/... ./cmd/... -covermode=count -coverprofile cover.out
.PHONY: clean
clean: