2017-08-05 18:30:20 +00:00
|
|
|
sudo: false
|
|
|
|
|
|
|
|
language: go
|
|
|
|
go:
|
2017-12-03 20:01:25 +00:00
|
|
|
- 1.8.x
|
|
|
|
- 1.9.x
|
2018-03-30 09:42:11 +00:00
|
|
|
- 1.10.x
|
|
|
|
- master
|
|
|
|
|
|
|
|
env:
|
|
|
|
matrix:
|
|
|
|
- MODE=default
|
|
|
|
- MODE=breaking
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
exclude:
|
|
|
|
- go: 1.8.x
|
|
|
|
env: MODE=breaking
|
|
|
|
- go: 1.9.x
|
|
|
|
env: MODE=breaking
|
|
|
|
- go: master
|
|
|
|
env: MODE=breaking
|
|
|
|
allow_failures:
|
|
|
|
- env: MODE=breaking
|
|
|
|
- go: master
|
2017-08-05 18:30:20 +00:00
|
|
|
|
|
|
|
install:
|
|
|
|
- go get -u github.com/golang/lint/golint
|
2018-01-23 18:40:42 +00:00
|
|
|
- go get -u github.com/golang/dep/cmd/dep
|
|
|
|
- dep ensure
|
2017-08-05 18:30:20 +00:00
|
|
|
|
|
|
|
script:
|
2018-03-30 09:42:11 +00:00
|
|
|
- >-
|
|
|
|
if [[ $MODE == 'default' ]]; then
|
|
|
|
bash rungas.sh
|
|
|
|
grep -L -r --include *.go --exclude-dir vendor -P "Copyright (\d{4}|\(c\)) Microsoft" ./ | tee /dev/stderr | test -z "$(< /dev/stdin)"
|
|
|
|
test -z "$(go build $(go list ./... | grep -v vendor) | tee /dev/stderr)"
|
|
|
|
test -z "$(go fmt $(go list ./... | grep -v vendor) | tee /dev/stderr)"
|
|
|
|
go vet $(go list ./... | grep -v vendor)
|
|
|
|
go test $(sh ./findTestedPackages.sh)
|
|
|
|
fi
|
|
|
|
- >-
|
|
|
|
if [[ $MODE == 'breaking' ]]; then
|
|
|
|
go run ./tools/apidiff/main.go packages ./services FETCH_HEAD~1 FETCH_HEAD --copyrepo --breakingchanges
|
|
|
|
fi
|