mirror of
https://github.com/spf13/viper
synced 2025-05-07 20:57:18 +00:00
Currently a user can add new deps in *.go files that do not exist in the go.mod/go.sum. This commit adds a small check in CI to ensure that no new deps were added that aren't in the go.mod/go.sum. This commit includes a run of `go mod tidy`.
37 lines
623 B
YAML
37 lines
623 B
YAML
go_import_path: github.com/spf13/viper
|
|
|
|
language: go
|
|
|
|
env:
|
|
global:
|
|
- GO111MODULE="on"
|
|
|
|
go:
|
|
- 1.11.x
|
|
- tip
|
|
|
|
os:
|
|
- linux
|
|
- osx
|
|
|
|
matrix:
|
|
allow_failures:
|
|
- go: tip
|
|
fast_finish: true
|
|
|
|
script:
|
|
- go install ./...
|
|
|
|
# Ensure no dependencies were added without encoding them in go.mod/go.sum.
|
|
- go mod tidy
|
|
- git diff go.mod | tee /dev/stderr | (! read)
|
|
- git diff go.sum | tee /dev/stderr | (! read)
|
|
|
|
- diff -u <(echo -n) <(gofmt -d .)
|
|
- go test -v ./...
|
|
|
|
after_success:
|
|
- go get -u -d github.com/spf13/hugo
|
|
- cd $GOPATH/src/github.com/spf13/hugo && make && ./hugo -s docs && cd -
|
|
|
|
sudo: false
|