Travis updates

- Add Go 1.17
- Fix go fmt from Go 1.17 (build directives)
- Download version of misspell and staticcheck instead of doing
"go get" since current staticcheck would be broken without go.mod

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2021-11-15 16:48:07 -07:00
parent 2c53e9759b
commit f805f23d6e
25 changed files with 30 additions and 10 deletions

View File

@@ -7,8 +7,8 @@ vm:
language: go
go:
- 1.17.x
- 1.16.x
- 1.15.x
addons:
apt:
packages:
@@ -17,11 +17,8 @@ env:
- GO111MODULE=off
go_import_path: github.com/nats-io/nats-server
install:
- go get github.com/nats-io/nats.go/
- go get github.com/nats-io/nkeys
- go get github.com/nats-io/jwt
- go get -u honnef.co/go/tools/cmd/staticcheck
- go get -u github.com/client9/misspell/cmd/misspell
- GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck@2021.1.2
- GO111MODULE=on go get github.com/client9/misspell/cmd/misspell@v0.3.4
before_script:
- GO_LIST=$(go list ./...)
- go build
@@ -33,10 +30,10 @@ script:
- set -e
- if [[ $TRAVIS_TAG ]]; then go test -v -run=TestVersionMatchesTag ./server; fi
- if [[ ! $TRAVIS_TAG ]]; then go test -v -run=TestNoRace --failfast -p=1 -timeout 20m ./...; fi
- if [[ ! $TRAVIS_TAG ]]; then if [[ "$TRAVIS_GO_VERSION" =~ 1.15 ]]; then ./scripts/cov.sh TRAVIS; else go test -v -race -p=1 --failfast -timeout 20m ./...; fi; fi
- if [[ ! $TRAVIS_TAG ]]; then if [[ "$TRAVIS_GO_VERSION" =~ 1.16 ]]; then ./scripts/cov.sh TRAVIS; else go test -v -race -p=1 --failfast -timeout 20m ./...; fi; fi
- set +e
after_success:
- if [[ ! $TRAVIS_TAG ]]; then if [[ "$TRAVIS_GO_VERSION" =~ 1.15 ]]; then $HOME/gopath/bin/goveralls -coverprofile=acc.out -service travis-ci; fi; fi
- if [[ ! $TRAVIS_TAG ]]; then if [[ "$TRAVIS_GO_VERSION" =~ 1.16 ]]; then $HOME/gopath/bin/goveralls -coverprofile=acc.out -service travis-ci; fi; fi
deploy:
provider: script