From 94cb7f39d4813bfd059ccd990f239124525ef564 Mon Sep 17 00:00:00 2001 From: insomniac Date: Sun, 6 May 2018 15:18:30 +0200 Subject: Added code coverage via Codecov (#60) --- .travis/tests.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .travis/tests.sh (limited to '.travis/tests.sh') diff --git a/.travis/tests.sh b/.travis/tests.sh new file mode 100755 index 0000000..ce77be6 --- /dev/null +++ b/.travis/tests.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# because things are never simple. +# See https://github.com/codecov/example-go#caveat-multiple-files + +set -e +echo "" > coverage.txt + +for d in $(go list ./... | grep -v vendor); do + go test -race -coverprofile=profile.out -covermode=atomic $d + if [ -f profile.out ]; then + cat profile.out >> coverage.txt + rm profile.out + fi +done -- cgit v1.2.3