Skip to content

Commit e529b36

Browse files
authored
Fix travis integration on external PRs (#92)
* only run test coverage if there's a token * enable gomodules * no bash
1 parent f85dfac commit e529b36

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ language: go
66
go:
77
- "1.12"
88

9+
env:
10+
- GO111MODULE=on
11+
912
install:
1013
# download our task runner
1114
- go get github.com/alecaivazis/run
@@ -15,8 +18,9 @@ install:
1518
script:
1619
# install the dependencies
1720
- run install
18-
# generate and report the test coverage
19-
- run tests:coverage
21+
# generate and report the test coverage if we have a token for coveralls
22+
- 'if [ "$COVERALLS_TOKEN" != "" ]; then run tests:coverage; fi'
23+
- 'if [ "$COVERALLS_TOKEN" = "" ]; then run tests; fi'
2024

2125
before_deploy:
2226
# build the binaries

0 commit comments

Comments
 (0)