mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user