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.
This commit is contained in:
Dave Collins 2019-07-21 19:29:24 -05:00
parent 571706dde2
commit a3a3638255
No known key found for this signature in database
GPG Key ID: B8904D9D9C93D1F2
2 changed files with 5 additions and 4 deletions

View File

@ -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:

View File

@ -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 \