Skip to content

Commit

Permalink
.travis.yml: Grow the build matrix, pin golang.org/x/tools version
Browse files Browse the repository at this point in the history
Not pinning the golang.org/x/tools version causes non-module builds to use
the latest version, which is broken on older versions of Go.
  • Loading branch information
LukeShu committed Jun 28, 2019
1 parent 3bf72b1 commit ff068b1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,22 @@ matrix:
include:
- go: "1.9"
- go: "1.10"
- go: "1.11"
env: {GO111MODULE: "off"}
- go: "1.12"
env: {GO111MODULE: "off"}
- go: "tip"
env: {GO111MODULE: "off"}

install: |
if test -z "$(go env GOMOD)"; then
go get -d -t ./... &&
ver=$(sed -n '/^require/s/.*[ -]//p' go.mod) &&
(
cd "$(go env GOPATH)/src/golang.org/x/tools" &&
git checkout "$ver"
)
fi
script:
- go test -race ./...

0 comments on commit ff068b1

Please sign in to comment.