From 36bcfdcd99d7216908530668750c8728b88d0b6f Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 21 Nov 2019 21:07:35 +0800 Subject: [PATCH] add coveralls test coverage stats --- .travis.yml | 6 +++++- Makefile | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9a2796d9e..50617b742 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Makefile b/Makefile index 73bc09dfd..279bf10e1 100644 --- a/Makefile +++ b/Makefile @@ -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: