File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,11 @@ script:
5252 - go test -v -race -run "$race_tests" -timeout 15m
5353
5454 # We run all tests again to get full coverage, technically unncecessary tho
55- - go test -v -timeout 30m -coverprofile=coverage.txt -coverpkg=$(go list ./... | grep -v msg | awk -vORS=, '{ print $1 }' | sed 's/,$/\n/') ./...
55+ - coverpkg_ignore='/msg'
56+ # coverpkg for multiple mains is broken in 1.12, so we need to exclude the examples from coverage
57+ # https://github.com/golang/go/issues/30374
58+ - if ! [[ "$TRAVIS_GO_VERSION" =~ ^1\.11 ]]; then coverpkg_ignore="${coverpkg_ignore}|/examples"; fi
59+ - go test -v -timeout 30m -coverprofile=coverage.txt -coverpkg=$(go list ./... | grep -v -E ${coverpkg_ignore} | awk -vORS=, '{ print $1 }' | sed 's/,$/\n/') ./...
5660
5761after_success :
5862 - bash <(curl -s https://codecov.io/bash)
You can’t perform that action at this time.
0 commit comments