Skip to content

Commit

Permalink
combine profiles before sending to coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
djherbis committed Dec 31, 2018
1 parent b46264f commit 610ef0a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ script() {
then
COVERALLS_PARALLEL=true
go get github.com/axw/gocov/gocov github.com/mattn/goveralls golang.org/x/tools/cmd/cover
$HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN
go test -covermode=count -coverprofile=profile.cov

# add js coverage
if [ "$TRAVIS_OS_NAME" == "linux" ];
then
bash js.cover.sh
$HOME/gopath/bin/goveralls -coverprofile=profile.cov -service=travis-ci -repotoken $COVERALLS_TOKEN
fi

PROFILES=`ls -dm profile.cov*`
$HOME/gopath/bin/goveralls -coverprofile="$PROFILES" -service=travis-ci -repotoken $COVERALLS_TOKEN
fi

go get golang.org/x/lint/golint && golint ./...
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ matrix:
go: 1.11
script: bash .travis.sh script
notifications:
webhooks: https://coveralls.io/webhook
email:
on_success: never
on_failure: change
2 changes: 1 addition & 1 deletion js.cover.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ set -e

docker build -f js.cover.dockerfile -t js.cover.djherbis.times .
docker create --name js.cover.djherbis.times js.cover.djherbis.times
docker cp js.cover.djherbis.times:/go/src/github.com/djherbis/times/profile.cov .
docker cp js.cover.djherbis.times:/go/src/github.com/djherbis/times/profile.cov ./profile.cov.js
docker rm -v js.cover.djherbis.times

0 comments on commit 610ef0a

Please sign in to comment.