Gah. Of course it doesn't work, since the exit status from test is 1.

Replace "&&" with an "if".
This commit is contained in:
Sebastian Zagrodzki
2017-03-26 18:16:12 +02:00
parent e1279ed840
commit 927ef57ca7

View File

@@ -22,4 +22,4 @@ install:
script:
# a workaround for go test not supporting coverage for multiple packages in a single invocation
- |-
[ -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"
if [ -n "$COVERALLS_TOKEN" ]; then 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"; fi