From 72693a549b464a44bba7ac7128d705fe992dfe8a Mon Sep 17 00:00:00 2001 From: max furman Date: Fri, 2 Nov 2018 23:19:56 -0700 Subject: [PATCH] add collect codecov report --- .travis.yml | 5 +++++ Makefile | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f7b4ecda..ae3adcca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,14 @@ language: go go: - 1.11.x +env: + global: + - V=1 before_script: - make bootstrap script: - make +after_success: +- bash <(curl -s https://codecov.io/bash) -t "$CODECOV_TOKEN" || echo "Codecov did not collect coverage reports" notifications: email: false diff --git a/Makefile b/Makefile index 06979819..7eb9c300 100644 --- a/Makefile +++ b/Makefile @@ -93,12 +93,12 @@ generate: # Test ######################################### test: - $Q $(GOFLAGS) go test -short -cover ./... + $Q $(GOFLAGS) go test -short -coverprofile=coverage.out ./... vtest: $(Q)for d in $$(go list ./... | grep -v vendor); do \ echo -e "TESTS FOR: for \033[0;35m$$d\033[0m"; \ - $(GOFLAGS) go test -v -bench=. -run=. -short -coverprofile=profile.coverage.out -covermode=atomic $$d; \ + $(GOFLAGS) go test -v -bench=. -run=. -short -coverprofile=coverage.out $$d; \ out=$$?; \ if [[ $$out -ne 0 ]]; then ret=$$out; fi;\ rm -f profile.coverage.out; \