forked from nats-io/nats-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (38 loc) · 967 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
language: go
go:
- 1.13.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 -v -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