Skip to content

Commit 9992078

Browse files
committed
Simplify travis-ci build
This change avoids the need to copy the source out of the GOPATH by applying GO111MODULE=on as an environment variable. Additionally, avoids issues with parallel module downloads (see golang/go#26794 and golang/go#27372) by running 'go mod download' during the install step.
1 parent 4b82f74 commit 9992078

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ go:
1111
os:
1212
- linux
1313
- osx
14+
env:
15+
- GO111MODULE=on
1416
matrix:
1517
allow_failures:
1618
- go: tip
1719
fast_finish: true
1820
install:
19-
- mkdir -p $HOME/src
20-
- mv $HOME/gopath/src/github.com/gohugoio/hugo $HOME/src
21-
- export TRAVIS_BUILD_DIR=$HOME/src/hugo
22-
- cd $HOME/src/hugo
21+
- go mod download
2322
- go get github.com/magefile/mage
2423
script:
2524
- mage -v test

0 commit comments

Comments
 (0)