Files
nats-server/.travis.yml
Ivan Kozlovic 3d2a961c5a Updates to the script
- Replace EXCLUDE_VENDOR with GO_LIST since `go list` already
  excludes vendor directory.
- Changed misspell invocation because it was not doing what
  it was supposed to.
- Use `./...` in the test commands.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-09-12 10:24:56 -06:00

41 lines
965 B
YAML

language: go
go:
- 1.11.x
- 1.12.x
addons:
apt:
packages:
- rpm
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
before_script:
- GO_LIST=$(go list ./...)
- go build
- $(exit $(go fmt $GO_LIST | wc -l))
- go vet $GO_LIST
- find . -type f -name "*.go" | grep -v "/vendor/" | xargs misspell -error -locale US
- staticcheck $GO_LIST
script:
- set -e
- go test -i ./...
- go test -run=TestNoRace --failfast -p=1 ./...
- if [[ "$TRAVIS_GO_VERSION" =~ 1.12 ]]; then ./scripts/cov.sh TRAVIS; else go test -v -race -p=1 --failfast ./...; fi
- set +e
deploy:
provider: script
skip_cleanup: true
script: curl -sL http://git.io/goreleaser | bash
verbose: true
on:
tags: true
condition: $TRAVIS_GO_VERSION =~ 1.12