mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
language: go
|
|
go:
|
|
- 1.11.x
|
|
- 1.12.x
|
|
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 github.com/mattn/goveralls
|
|
- go get github.com/wadey/gocovmerge
|
|
- go get github.com/tcnksm/ghr
|
|
- go get -u honnef.co/go/tools/cmd/staticcheck
|
|
- go get -u github.com/client9/misspell/cmd/misspell
|
|
before_script:
|
|
- EXCLUDE_VENDOR=$(go list ./... | grep -v "/vendor/")
|
|
- go build
|
|
- $(exit $(go fmt $EXCLUDE_VENDOR | wc -l))
|
|
- go vet $EXCLUDE_VENDOR
|
|
- misspell -error -locale US $EXCLUDE_VENDOR
|
|
- staticcheck $EXCLUDE_VENDOR
|
|
- if [[ "$TRAVIS_GO_VERSION" =~ 1.11 ]] && [ "$TRAVIS_TAG" != "" ]; then ./scripts/cross_compile.sh $TRAVIS_TAG; fi
|
|
script:
|
|
- go test -i $EXCLUDE_VENDOR
|
|
- go test -run=TestNoRace $EXCLUDE_VENDOR
|
|
- if [[ "$TRAVIS_GO_VERSION" =~ 1.11 ]]; then ./scripts/cov.sh TRAVIS; else GOGC=10 go test -v -race -p=1 --failfast $EXCLUDE_VENDOR; fi
|
|
after_success:
|
|
- if [[ "$TRAVIS_GO_VERSION" =~ 1.11 ]] && [ "$TRAVIS_TAG" != "" ]; then ghr --owner nats-io --token $GITHUB_TOKEN --draft --replace $TRAVIS_TAG pkg/; fi
|