travis: build with HEAD and vendored deps
Builds failing on HEAD do not fail CI/CD. Instead, this should be used as a canary for breaking changes upstream.
This commit is contained in:
parent
f69159362a
commit
d38a7017d1
1 changed files with 34 additions and 9 deletions
43
.travis.yml
43
.travis.yml
|
@ -2,15 +2,40 @@ language: go
|
|||
go:
|
||||
- 1.9.x
|
||||
sudo: false
|
||||
install:
|
||||
- go get -t ./...
|
||||
- go get -u github.com/golang/lint/golint
|
||||
- go get -u golang.org/x/tools/cmd/goimports
|
||||
script:
|
||||
- go test -v $(go list ./... | grep -v /vendor/)
|
||||
- go vet $(go list ./... | grep -v /vendor/)
|
||||
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
||||
- (for d in $(go list ./... | grep -v /vendor/); do diff <(golint $d) <(printf "") || exit 1; done)
|
||||
matrix:
|
||||
include:
|
||||
# Using vendored dependencies
|
||||
- install:
|
||||
- go get -u github.com/golang/dep/...
|
||||
- go get -u github.com/golang/lint/...
|
||||
- go get -u golang.org/x/tools/cmd/...
|
||||
script:
|
||||
- dep ensure
|
||||
- go test -v $(go list ./... | grep -v /vendor/)
|
||||
- go vet $(go list ./... | grep -v /vendor/)
|
||||
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
||||
- (for d in $(go list ./... | grep -v /vendor/); do diff <(golint $d) <(printf "") || exit 1; done)
|
||||
# Using HEAD of dependencies
|
||||
- install:
|
||||
- go get -t ./...
|
||||
- go get -u github.com/golang/lint/...
|
||||
- go get -u golang.org/x/tools/cmd/...
|
||||
script:
|
||||
- go test -v $(go list ./... | grep -v /vendor/)
|
||||
- go vet $(go list ./... | grep -v /vendor/)
|
||||
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
||||
- (for d in $(go list ./... | grep -v /vendor/); do diff <(golint $d) <(printf "") || exit 1; done)
|
||||
allow_failures:
|
||||
# Using HEAD of dependencies
|
||||
- install:
|
||||
- go get -t ./...
|
||||
- go get -u github.com/golang/lint/...
|
||||
- go get -u golang.org/x/tools/cmd/...
|
||||
script:
|
||||
- go test -v $(go list ./... | grep -v /vendor/)
|
||||
- go vet $(go list ./... | grep -v /vendor/)
|
||||
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
||||
- (for d in $(go list ./... | grep -v /vendor/); do diff <(golint $d) <(printf "") || exit 1; done)
|
||||
notifications:
|
||||
irc:
|
||||
channels:
|
||||
|
|
Loading…
Reference in a new issue