Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 90241f5

Browse files
committed
Add travis build
1 parent ac93099 commit 90241f5

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.travis.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
language: go
2+
3+
go:
4+
- 1.10.x
5+
6+
go_import_path: contrib.go.opencensus.io/exporter/stackdriver
7+
8+
before_script:
9+
- GO_FILES=$(find . -iname '*.go' | grep -v /vendor/) # All the .go files, excluding vendor/ if any
10+
- PKGS=$(go list ./... | grep -v /vendor/) # All the import paths, excluding vendor/ if any
11+
12+
script:
13+
- go build ./... # Ensure dependency updates don't break build
14+
- if [ -n "$(gofmt -s -l $GO_FILES)" ]; then echo "gofmt the following files:"; gofmt -s -l $GO_FILES; exit 1; fi
15+
- go vet ./...
16+
- go test -v -race $PKGS # Run all the tests with the race detector enabled
17+
- 'if [[ $TRAVIS_GO_VERSION = 1.8* ]]; then ! golint ./... | grep -vE "(_mock|_string|\.pb)\.go:"; fi'

0 commit comments

Comments
 (0)