language: go
go:
- 1.19.x
- 1.18.x
go_import_path: github.com/nats-io/stan.go
install:
- if [[ "$TRAVIS_GO_VERSION" =~ 1.19 ]]; then go install honnef.co/go/tools/cmd/staticcheck@latest; fi
- go install github.com/client9/misspell/cmd/misspell@latest
before_script:
- $(exit $(go fmt ./... | wc -l))
- go vet -modfile go_tests.mod ./...
- find . -type f -name "*.go" | grep -v "/pb/" | xargs misspell -error -locale US
- if [[ "$TRAVIS_GO_VERSION" =~ 1.19 ]]; then staticcheck -tests=false ./...; fi
script:
- go test -v -race . -modfile go_tests.mod
after_success:
- if [[ "$TRAVIS_GO_VERSION" =~ 1.19 ]]; then ./scripts/cov.sh TRAVIS; fi
