.travis.yml 1.1 KB

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