[travis] test multiple packages

This commit is contained in:
Eyal Posener 2017-05-07 19:54:57 +03:00
parent dd75ca3aff
commit 328144c31b
2 changed files with 13 additions and 3 deletions

View File

@ -8,9 +8,7 @@ before_install:
- go get -u -t ./...
script:
- go test -v -race -coverprofile=coverage.txt -covermode=atomic
- ./test.sh
after_success:
- bash <(curl -s https://codecov.io/bash)
comment: off

12
test.sh Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -e
echo "" > coverage.txt
for d in $(go list ./... | grep -v vendor); do
go test -v -race -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done