If the coveralls token is not set, don't try to push the coverage report.
This commit is contained in:
@@ -22,5 +22,4 @@ install:
|
|||||||
script:
|
script:
|
||||||
# a workaround for go test not supporting coverage for multiple packages in a single invocation
|
# 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 ': > coverage.tmp; go test -v -covermode=count -coverprofile=coverage.tmp {} && tail -n +2 coverage.tmp >> coverage.merged' && rm coverage.tmp
|
[ -n "$COVERALLS_TOKEN" ] && echo 'mode: count' > coverage.merged && go list ./... | xargs -n1 -I{} sh -c ': > coverage.tmp; go test -v -covermode=count -coverprofile=coverage.tmp {} && tail -n +2 coverage.tmp >> coverage.merged' && rm coverage.tmp && $HOME/gopath/bin/goveralls -coverprofile=coverage.merged -service=travis-ci -ignore usb/libusb.go -repotoken "$COVERALLS_TOKEN"
|
||||||
- $HOME/gopath/bin/goveralls -coverprofile=coverage.merged -service=travis-ci -ignore usb/libusb.go -repotoken $COVERALLS_TOKEN
|
|
||||||
|
Reference in New Issue
Block a user