]>
Commit | Line | Data |
---|---|---|
107c1cdb ND |
1 | language: go |
2 | ||
3 | go: | |
4 | # 1.8 is tested by AppVeyor | |
5 | - 1.11.x | |
6 | ||
7 | go_import_path: go.opencensus.io | |
8 | ||
9 | # Don't email me the results of the test runs. | |
10 | notifications: | |
11 | email: false | |
12 | ||
13 | before_script: | |
14 | - GO_FILES=$(find . -iname '*.go' | grep -v /vendor/) # All the .go files, excluding vendor/ if any | |
15 | - PKGS=$(go list ./... | grep -v /vendor/) # All the import paths, excluding vendor/ if any | |
16 | - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh # Install latest dep release | |
17 | - go get github.com/rakyll/embedmd | |
18 | ||
19 | script: | |
20 | - embedmd -d README.md # Ensure embedded code is up-to-date | |
21 | - go build ./... # Ensure dependency updates don't break build | |
22 | - if [ -n "$(gofmt -s -l $GO_FILES)" ]; then echo "gofmt the following files:"; gofmt -s -l $GO_FILES; exit 1; fi | |
23 | - go vet ./... | |
24 | - go test -v -race $PKGS # Run all the tests with the race detector enabled | |
25 | - GOARCH=386 go test -v $PKGS # Run all tests against a 386 architecture | |
26 | - 'if [[ $TRAVIS_GO_VERSION = 1.8* ]]; then ! golint ./... | grep -vE "(_mock|_string|\.pb)\.go:"; fi' | |
27 | - go run internal/check/version.go |