Run code coverage in script:

For all builds, we were running `go test -race`, and for a specific
version of Go, we were running the code coverage suite on success.
The code coverage uses `-covermode=atomic`, which is equivalent
of running with `-race`, so we will now run the code coverage
in the `script: ` section for that Go version and `go test -race`
for the other.
This prevents the double tests for the target Go version.
This commit is contained in:
Ivan Kozlovic
2017-07-06 09:32:06 -06:00
parent b6e43c0dc1
commit 7d6414dcf2

View File

@@ -21,7 +21,6 @@ before_script:
- if [[ "$TRAVIS_GO_VERSION" == 1.7.* ]]; then ./scripts/cross_compile.sh $TRAVIS_TAG; fi
script:
- go test -i -race $EXCLUDE_VENDOR
- go test -v -race $EXCLUDE_VENDOR
- if [[ "$TRAVIS_GO_VERSION" == 1.7.* ]]; then ./scripts/cov.sh TRAVIS; else go test -v -race $EXCLUDE_VENDOR; fi
after_success:
- if [[ "$TRAVIS_GO_VERSION" == 1.7.* ]]; then ./scripts/cov.sh TRAVIS; fi
- if [[ "$TRAVIS_GO_VERSION" == 1.7.* ]] && [ "$TRAVIS_TAG" != "" ]; ghr --owner nats-io --token $GITHUB_TOKEN --draft --replace $TRAVIS_TAG pkg/; fi