diff --git a/.travis.yml b/.travis.yml index 2d0f260..7605bbd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,16 @@ go: - "stable" - tip +env: + - GO111MODULE: "on" + matrix: allow_failures: - go: tip script: - - if [ "${TRAVIS_GO_VERSION}" = "stable" ]; then make golangci-lint + - if [ "${TRAVIS_GO_VERSION}" = "stable" ]; then make check-mod; fi + - if [ "${TRAVIS_GO_VERSION}" = "stable" ]; then make golangci-lint; fi - if [ "${TRAVIS_GO_VERSION}" = "stable" ]; then echo running check scripts; make check; fi - make build - make TEST_FLAGS="-v" test diff --git a/Makefile b/Makefile index 3f42da0..3225dee 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ +GO111MODULE ?= on LINTER_BIN ?= golangci-lint +export GO111MODULE + .PHONY: build: bin/go-md2man @@ -31,3 +34,15 @@ $(LINTER_BIN): curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.15.0; \ fi +.PHONY: mod +mod: + @go mod tidy + +.PHONY: check-mod +check-mod: # verifies that module changes for go.mod and go.sum are checked in + @hack/ci/check_mods.sh + +.PHONY: vendor +vendor: mod + @go mod vendor -v +