mirror of
https://github.com/octoleo/restic.git
synced 2024-11-27 23:36:40 +00:00
46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
sudo: false
|
|
|
|
language: go
|
|
go:
|
|
- 1.8.x
|
|
- 1.9.x
|
|
- 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
|
|
|
|
install:
|
|
- go get -u github.com/golang/lint/golint
|
|
- go get -u github.com/golang/dep/cmd/dep
|
|
- dep ensure
|
|
|
|
script:
|
|
- >-
|
|
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
|