mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
28 lines
949 B
YAML
28 lines
949 B
YAML
language: go
|
|
go:
|
|
- 1.6.4
|
|
- 1.7.6
|
|
- 1.8.3
|
|
install:
|
|
- go get github.com/nats-io/go-nats
|
|
- go get github.com/mattn/goveralls
|
|
- go get github.com/wadey/gocovmerge
|
|
- go get -u honnef.co/go/tools/cmd/staticcheck
|
|
- go get -u honnef.co/go/tools/cmd/gosimple
|
|
- 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
|
|
- gosimple $EXCLUDE_VENDOR
|
|
- misspell -error -locale US .
|
|
- staticcheck $EXCLUDE_VENDOR
|
|
- if [[ "$TRAVIS_GO_VERSION" == 1.7.* ]]; then ./scripts/cross_compile.sh $TRAVIS_TAG; fi
|
|
script:
|
|
- go test -i -race $EXCLUDE_VENDOR
|
|
- go test -v -race $EXCLUDE_VENDOR
|
|
after_success:
|
|
- if [[ "$TRAVIS_GO_VERSION" == 1.7.* ]]; then ./scripts/cov.sh TRAVIS; fi
|
|
- if [[ "$TRAVIS_GO_VERSION" == 1.7.* ]] && [ "$TRAVIS_TAG" != "" ]; ghr --owner nats-io --token $GITHUB_TOKEN --draft --replace $TRAVIS_TAG pkg/; fi
|