.travis.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. language: go
  2. go:
  3. - "1.21.x"
  4. - "1.20.x"
  5. go_import_path: github.com/nats-io/nats.go
  6. install:
  7. - go get -t ./...
  8. - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
  9. - if [[ "$TRAVIS_GO_VERSION" =~ 1.21 ]]; then
  10. go install github.com/mattn/goveralls@latest;
  11. go install github.com/wadey/gocovmerge@latest;
  12. go install honnef.co/go/tools/cmd/staticcheck@latest;
  13. go install github.com/client9/misspell/cmd/misspell@latest;
  14. fi
  15. before_script:
  16. - $(exit $(go fmt ./... | wc -l))
  17. - go vet -modfile=go_test.mod ./...
  18. - if [[ "$TRAVIS_GO_VERSION" =~ 1.21 ]]; then
  19. find . -type f -name "*.go" | xargs misspell -error -locale US;
  20. GOFLAGS="-mod=mod -modfile=go_test.mod" staticcheck ./...;
  21. fi
  22. - golangci-lint run ./jetstream/...
  23. script:
  24. - go test -modfile=go_test.mod -v -run=TestNoRace -p=1 ./... --failfast -vet=off
  25. - if [[ "$TRAVIS_GO_VERSION" =~ 1.21 ]]; then ./scripts/cov.sh TRAVIS; else go test -modfile=go_test.mod -race -v -p=1 ./... --failfast -vet=off -tags=internal_testing; fi
  26. after_success:
  27. - if [[ "$TRAVIS_GO_VERSION" =~ 1.21 ]]; then $HOME/gopath/bin/goveralls -coverprofile=acc.out -service travis-ci; fi
  28. jobs:
  29. include:
  30. - name: "Go: 1.21.x (nats-server@main)"
  31. go: "1.21.x"
  32. before_script:
  33. - go get -modfile go_test.mod github.com/nats-io/nats-server/v2@main
  34. allow_failures:
  35. - name: "Go: 1.21.x (nats-server@main)"