From 2c69e26ced190b7030378d148d1089a1158286b5 Mon Sep 17 00:00:00 2001 From: Walter Scheper Date: Fri, 14 Sep 2018 22:58:12 -0400 Subject: [PATCH] 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. --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c0aaa27ae2b..2cc10a13eb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,16 +11,15 @@ go: os: - linux - osx +env: +- GO111MODULE=on matrix: allow_failures: - go: tip fast_finish: true install: - - mkdir -p $HOME/src - - mv $HOME/gopath/src/github.com/gohugoio/hugo $HOME/src - - export TRAVIS_BUILD_DIR=$HOME/src/hugo - - cd $HOME/src/hugo - go get github.com/magefile/mage + - go mod download script: - mage -v test - mage -v check