diff --git a/.travis.yml b/.travis.yml index 4f8ea187a..597358115 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,8 @@ before_install: - go get github.com/mattn/goveralls script: + - make lint - make - - make test - make test-cover after_success: diff --git a/Makefile b/Makefile index 25d13ba37..72f5b18ac 100644 --- a/Makefile +++ b/Makefile @@ -18,11 +18,11 @@ endef # run all tests with coverage define test_cover_only @echo "# running unit tests with coverage analysis" - @go test -coverprofile=${COVER_DIR}coverage_unit1.out ./logging/logrus - @go test -coverprofile=${COVER_DIR}coverage_unit2.out ./db/keyval/etcdv3 - @go test -coverprofile=${COVER_DIR}coverage_unit3.out ./messaging/kafka/client - @go test -coverprofile=${COVER_DIR}coverage_unit4.out ./messaging/kafka/mux - @go test -coverprofile=${COVER_DIR}coverage_unit5.out ./utils/addrs + @go test -covermode=count -coverprofile=${COVER_DIR}coverage_unit1.out ./logging/logrus + @go test -covermode=count -coverprofile=${COVER_DIR}coverage_unit2.out ./db/keyval/etcdv3 + @go test -covermode=count -coverprofile=${COVER_DIR}coverage_unit3.out ./messaging/kafka/client + @go test -covermode=count -coverprofile=${COVER_DIR}coverage_unit4.out ./messaging/kafka/mux + @go test -covermode=count -coverprofile=${COVER_DIR}coverage_unit5.out ./utils/addrs @echo "# merging coverage results" @cd vendor/github.com/wadey/gocovmerge && go install -v @gocovmerge ${COVER_DIR}coverage_unit1.out ${COVER_DIR}coverage_unit2.out ${COVER_DIR}coverage_unit3.out ${COVER_DIR}coverage_unit4.out ${COVER_DIR}coverage_unit5.out > ${COVER_DIR}coverage.out