mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Since we have never released with goreleaser and GO111MODULE=on and have removed vendor directory, we are going to push a v2.7.0-rc1 tag. If the goreleaser process works fine and submit the draft release correctly, we will not do an actual v2.7.0-rc1 release. Instead, we will follow up immediately with the v2.7.0 tag and the proper release. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
|
|
os: linux
|
|
dist: focal
|
|
|
|
vm:
|
|
size: 2x-large
|
|
|
|
language: go
|
|
go:
|
|
- 1.17.x
|
|
- 1.16.x
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- rpm
|
|
env:
|
|
- GO111MODULE=on
|
|
go_import_path: github.com/nats-io/nats-server
|
|
install:
|
|
- go install honnef.co/go/tools/cmd/staticcheck@latest
|
|
- go install github.com/client9/misspell/cmd/misspell@latest
|
|
before_script:
|
|
- GO_LIST=$(go list ./...)
|
|
- go build
|
|
- $(exit $(go fmt $GO_LIST | wc -l))
|
|
- go vet $GO_LIST
|
|
- find . -type f -name "*.go" | xargs misspell -error -locale US
|
|
- staticcheck $GO_LIST
|
|
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.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.16 ]]; then $HOME/gopath/bin/goveralls -coverprofile=acc.out -service travis-ci; fi; fi
|
|
|
|
deploy:
|
|
provider: script
|
|
cleanup: true
|
|
script: curl -sL http://git.io/goreleaser
|
|
on:
|
|
tags: true
|
|
condition: $TRAVIS_GO_VERSION =~ 1.17
|