Update .test-coverage

This commit is contained in:
Martin Geno 2017-05-17 18:46:32 +02:00
parent dc54a01289
commit 08a36827c4
2 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,9 @@
# Issue: https://github.com/mattn/goveralls/issues/20 # Issue: https://github.com/mattn/goveralls/issues/20
# Source: https://github.com/uber/go-torch/blob/63da5d33a225c195fea84610e2456d5f722f3963/.test-cover.sh # Source: https://github.com/uber/go-torch/blob/63da5d33a225c195fea84610e2456d5f722f3963/.test-cover.sh
CI=$1 CI=$1
TOKEN=$2
echo "run for $CI" echo "run for $CI"
echo "with $(go version)"
echo "mode: count" > profile.cov echo "mode: count" > profile.cov
FAIL=0 FAIL=0
@ -22,7 +24,7 @@ done
# Failures have incomplete results, so don't send # Failures have incomplete results, so don't send
if [ "$FAIL" -eq 0 ]; then if [ "$FAIL" -eq 0 ]; then
goveralls -service=$CI -v -coverprofile=profile.cov goveralls -v -coverprofile=profile.cov -service=$CI -repotoken=$TOKEN
fi fi
exit $FAIL exit $FAIL

View File

@ -15,4 +15,4 @@ test:
- go get github.com/mattn/goveralls - go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover - go get golang.org/x/tools/cmd/cover
override: override:
- ./.test-coverage circle-ci - ./.test-coverage circle-ci ${COVERALLS_REPO_TOKEN}