forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (37 loc) · 1.34 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
sudo: false
language: go
go:
- 1.10.x
- 1.11.x
- 1.12.x
branches:
only:
- master
- latest
env:
global:
- DEP_RELEASE_TAG=v0.5.1 # so the script knows which version to use
- IGNORE_BREAKING_CHANGES=true
matrix:
- GOARCH="amd64"
- GOARCH="386"
before_install:
- curl -sSL https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
install:
- dep ensure -v
script:
- bash rungas.sh
- grep -L -r --include *.go --exclude-dir vendor -P "Copyright (\d{4}|\(c\)) Microsoft" ./ | tee /dev/stderr | test -z "$(< /dev/stdin)"
- echo -e "travis_fold:start:go.build\033[33;1mBuilding all packages\033[0m"
- go build -v $(go list ./... | grep -v vendor)
- echo -e "\ntravis_fold:end:go.build\r"
- if [[ $TRAVIS_GO_VERSION == 1.11* ]]; then test -z "$(go fmt $(go list ./... | grep -v vendor) | tee /dev/stderr)"; fi
- go vet $(go list ./... | grep -v vendor)
- go test $(sh ./findTestedPackages.sh)
- go run ./tools/apidiff/main.go packages ./services FETCH_HEAD~1 FETCH_HEAD --copyrepo --breakingchanges || $IGNORE_BREAKING_CHANGES
- go run ./tools/pkgchk/main.go ./services --exceptions ./tools/pkgchk/exceptions.txt
- git diff --exit-code
- if [[ "$TRAVIS_EVENT_TYPE" == "push" && "$TRAVIS_BRANCH" == "master" ]]; then go run ./tools/indexer/main.go ./services; fi
cache:
directories:
- $GOPATH/pkg/dep