22 lines
1.1 KiB
YAML
22 lines
1.1 KiB
YAML
|
language: go
|
||
|
|
||
|
go:
|
||
|
- 1.6.x
|
||
|
- 1.7.x
|
||
|
- 1.8.x
|
||
|
|
||
|
go_import_path: google.golang.org/grpc
|
||
|
|
||
|
before_install:
|
||
|
- if [[ $TRAVIS_GO_VERSION = 1.8* ]]; then go get -u github.com/golang/lint/golint honnef.co/go/tools/cmd/staticcheck; fi
|
||
|
- go get -u golang.org/x/tools/cmd/goimports github.com/axw/gocov/gocov github.com/mattn/goveralls golang.org/x/tools/cmd/cover
|
||
|
|
||
|
script:
|
||
|
- 'set -o pipefail && git ls-files "*.go" | xargs grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" 2>&1 | tee /dev/stderr | (! read)'
|
||
|
- 'set -o pipefail && gofmt -s -d -l . 2>&1 | tee /dev/stderr | (! read)'
|
||
|
- 'set -o pipefail && goimports -l . 2>&1 | tee /dev/stderr | (! read)'
|
||
|
- 'if [[ $TRAVIS_GO_VERSION = 1.8* ]]; then ! golint ./... | grep -vE "(_mock|_string|\.pb)\.go:"; fi'
|
||
|
- 'if [[ $TRAVIS_GO_VERSION = 1.8* ]]; then ! go tool vet -all . 2>&1 | grep -vF .pb.go:; fi' # https://github.com/golang/protobuf/issues/214
|
||
|
- make test testrace
|
||
|
- 'if [[ $TRAVIS_GO_VERSION = 1.8* ]]; then staticcheck -ignore google.golang.org/grpc/transport/transport_test.go:SA2002 ./...; fi' # TODO(menghanl): fix these
|