summaryrefslogtreecommitdiffhomepage
path: root/.travis/tests.sh
diff options
context:
space:
mode:
Diffstat (limited to '.travis/tests.sh')
-rwxr-xr-x.travis/tests.sh15
1 files changed, 15 insertions, 0 deletions
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