Skip to content

Commit

Permalink
Run code coverage in script:
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kozlovic committed Jul 6, 2017
1 parent b6e43c0 commit 7d6414d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7d6414d

Please sign in to comment.