Skip to content

Commit 7762f7e

Browse files
committed
[travis] check module deps
Signed-off-by: Brian Goff <[email protected]>
1 parent 0077313 commit 7762f7e

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.travis.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ go:
77
- "stable"
88
- tip
99

10+
env:
11+
- GO111MODULE: "on"
12+
1013
matrix:
1114
allow_failures:
1215
- go: tip
1316

1417
script:
15-
- if [ "${TRAVIS_GO_VERSION}" = "stable" ]; then make golangci-lint
18+
- if [ "${TRAVIS_GO_VERSION}" = "stable" ]; then make check-mod; fi
19+
- if [ "${TRAVIS_GO_VERSION}" = "stable" ]; then make golangci-lint; fi
1620
- if [ "${TRAVIS_GO_VERSION}" = "stable" ]; then echo running check scripts; make check; fi
1721
- make build
1822
- make TEST_FLAGS="-v" test

Makefile

+15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
GO111MODULE ?= on
12
LINTER_BIN ?= golangci-lint
23

4+
export GO111MODULE
5+
36
.PHONY:
47
build: bin/go-md2man
58

@@ -31,3 +34,15 @@ $(LINTER_BIN):
3134
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.15.0; \
3235
fi
3336

37+
.PHONY: mod
38+
mod:
39+
@go mod tidy
40+
41+
.PHONY: check-mod
42+
check-mod: # verifies that module changes for go.mod and go.sum are checked in
43+
@hack/ci/check_mods.sh
44+
45+
.PHONY: vendor
46+
vendor: mod
47+
@go mod vendor -v
48+

0 commit comments

Comments
 (0)