From a3a3638255dc4882e4b05547c303c079494c0118 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Sun, 21 Jul 2019 19:29:24 -0500 Subject: [PATCH] travis: Allow staged builds with build cache. This updates the tests to ensure all modules are downloaded prior to running the linter. This is necessary in order to support the travis build cache with staged builds on all platforms. --- .travis.yml | 8 ++++---- run_tests.sh | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 80d758a8..7a0cee69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,25 +9,25 @@ matrix: cache: directories: - $HOME/.cache/go-build - - $HOME/gopath/pkg/mod + - $HOME/go/pkg/mod - os: linux go: 1.11.x cache: directories: - $HOME/.cache/go-build - - $HOME/gopath/pkg/mod + - $HOME/go/pkg/mod - os: osx go: 1.12.x cache: directories: - $HOME/.cache/go-build - - $HOME/gopath/pkg/mod + - $HOME/go/pkg/mod - os: osx go: 1.11.x cache: directories: - $HOME/Library/Caches/go-build - - $HOME/gopath/pkg/mod + - $HOME/go/pkg/mod install: - go get -v github.com/golangci/golangci-lint/cmd/golangci-lint script: diff --git a/run_tests.sh b/run_tests.sh index 2d7cf727..14ed1c3c 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -37,6 +37,7 @@ for module in $MODPATHS; do MODNAME=. fi (cd $MODNAME && \ + go mod download && \ golangci-lint run --build-tags=rpctest --disable-all --deadline=10m \ --enable=gofmt \ --enable=gosimple \