diff --git a/.travis.yml b/.travis.yml index 8c4db16..ac428cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,6 @@ install: - go get github.com/mattn/goveralls script: - - go test -v -covermode=count -coverprofile=coverage.out -test.run='BCD|Parse' ./... - - $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN - + # a workaround for go test not supporting coverage for multiple packages in a single invocation + - echo 'mode: count' > coverage.merged && go list ./... | xargs -n1 -I{} sh -c 'go test -covermode=count -coverprofile=coverage.tmp -test.run="BCD|Parse" {} && tail -n +2 coverage.tmp >> coverage.merged' && rm coverage.tmp + - $HOME/gopath/bin/goveralls -coverprofile=coverage.merged -service=travis-ci -repotoken $COVERALLS_TOKEN