From 35cac33305b5db6fed9fda8d6f4f29febe020b87 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Mon, 13 Apr 2020 10:15:34 -0700 Subject: [PATCH] codecov --- .travis.yml | 4 ++++ boilerplate/lyft/golang_test_targets/Makefile | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5bd583423..dfec80fe0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,3 +16,7 @@ jobs: install: make install name: lint script: make lint + - stage: test + name: unit tests + install: make install + script: make test_unit_codecov diff --git a/boilerplate/lyft/golang_test_targets/Makefile b/boilerplate/lyft/golang_test_targets/Makefile index 529b79bd1..5abd2ed60 100644 --- a/boilerplate/lyft/golang_test_targets/Makefile +++ b/boilerplate/lyft/golang_test_targets/Makefile @@ -39,9 +39,15 @@ test_benchmark: .PHONY: test_unit_cover test_unit_cover: - go test ./... -coverprofile /tmp/cover.out -covermode=count; go tool cover -func /tmp/cover.out + go test ./... -coverprofile /tmp/cover.out -covermode=count + go tool cover -func /tmp/cover.out .PHONY: test_unit_visual test_unit_visual: - go test ./... -coverprofile /tmp/cover.out -covermode=count; go tool cover -html=/tmp/cover.out - + go test ./... -coverprofile /tmp/cover.out -covermode=count + go tool cover -html=/tmp/cover.out + +.PHONY: test_unit_codecov +test_unit_codecov: + go test ./... -race -coverprofile=coverage.txt -covermode=atomic + curl -s https://codecov.io/bash > codecov_bash.sh && bash codecov_bash.sh