Skip to content

Commit

Permalink
[travis] check module deps
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Goff <[email protected]>
  • Loading branch information
cpuguy83 committed Mar 14, 2019
1 parent 0077313 commit 7762f7e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
GO111MODULE ?= on
LINTER_BIN ?= golangci-lint

export GO111MODULE

.PHONY:
build: bin/go-md2man

Expand Down Expand Up @@ -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

0 comments on commit 7762f7e

Please sign in to comment.