Add code coverage integration

This commit is contained in:
Arturo Filastò 2019-12-02 15:25:23 +02:00
parent 58199a020e
commit cda9a3ee4f
2 changed files with 4 additions and 2 deletions

View File

@ -8,3 +8,5 @@ env:
script:
- ./build.sh _travis-${TRAVIS_OS_NAME}
- ./scripts/travis_test.sh
after_success:
- bash <(curl -s https://codecov.io/bash)

View File

@ -51,7 +51,7 @@ elif [ "$1" = "_travis-linux" ]; then
set -x
$0 linux
docker run -v `pwd`:/oonibuild -w /oonibuild -t oonibuild \
go test -v -coverprofile=ooni.cov ./...
go test -v -coverprofile=coverage.txt -covermode=atomic ./...
elif [ "$1" = "_travis-osx" ]; then
set -x
@ -60,7 +60,7 @@ elif [ "$1" = "_travis-osx" ]; then
brew upgrade
brew install measurement-kit
$0 macos
go test -v -coverprofile=ooni.cov ./...
go test -v -coverprofile=coverage.txt -covermode=atomic ./...
elif [ "$1" = "help" ]; then
echo "Usage: $0 linux | macos | release | windows"