-
Notifications
You must be signed in to change notification settings - Fork 28
/
.travis.yml
47 lines (40 loc) · 2.53 KB
/
.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
40
41
42
43
44
45
46
47
language: go
go:
# 1.12.x first, so coverage is sent as soon as first build finishes.
- 1.12.x
- 1.11.x
- 1.10.x
- master
os:
- linux
- osx
- windows
matrix:
allow_failures:
- os: windows
before_install:
- export STAN_HOST="localhost"
- export NATS_HOST="localhost"
- go get -v golang.org/x/lint/golint
- go get -v golang.org/x/tools/cmd/cover
- go get -v github.com/mattn/goveralls
- go get -v github.com/modocache/gover
- go get -v github.com/nats-io/gnatsd
- go get -v github.com/onsi/ginkgo/ginkgo
- go get -v github.com/onsi/gomega
- echo $TRAVIS_OS_NAME | grep osx && curl -fSsL https://github.com/nats-io/nats-streaming-server/releases/download/v0.11.2/nats-streaming-server-v0.11.2-darwin-amd64.zip -o nats.zip || echo "Skipping OSX"
- echo $TRAVIS_OS_NAME | grep linux && curl -fSsL https://github.com/nats-io/nats-streaming-server/releases/download/v0.11.2/nats-streaming-server-v0.11.2-linux-amd64.zip -o nats.zip || echo "Skipping Linux"
- echo $TRAVIS_OS_NAME | grep windows && curl -fSsL https://github.com/nats-io/nats-streaming-server/releases/download/v0.11.2/nats-streaming-server-v0.11.2-windows-amd64.zip -o nats.zip || echo "Skipping Windows"
- unzip nats.zip && ls
script:
- echo $TRAVIS_OS_NAME | grep windows && nats-streaming-server-v0.11.2-windows-amd64/nats-streaming-server || nohup nats-*/nats-streaming-server -mc 0 -l /dev/null &
- go version | grep 1.12 && echo $TRAVIS_OS_NAME | grep linux && go test ./... -race -coverprofile=coverage.txt -covermode=atomic 2>&1 > /dev/null || echo "Skipping CodeCov coverage file creation"
- ginkgo -r --randomizeAllSpecs --failFast --cover --trace
after_script:
- go version | grep 1.12 && echo $TRAVIS_OS_NAME | grep linux && curl -fSsL https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh?$(date +%s) | sudo bash || echo "Skipping Fossa Binary Download"
- go version | grep 1.12 && echo $TRAVIS_OS_NAME | grep linux && fossa init && fossa analyze || echo "Skipping Fossa Analysis"
- go version | grep 1.12 && echo $TRAVIS_OS_NAME | grep linux && fossa init && fossa test || echo "Skipping Fossa Tests"
after_success:
- go version | grep 1.12 && echo $TRAVIS_OS_NAME | grep linux && $GOPATH/bin/gover || echo "Skipping gover"
- go version | grep 1.12 && echo $TRAVIS_OS_NAME | grep linux && $GOPATH/bin/goveralls -service=travis-ci || echo "Skipping Goveralls"
- go version | grep 1.12 && echo $TRAVIS_OS_NAME | grep linux && bash <(curl -s https://codecov.io/bash) -t e1ecc5e9-6a8a-47cf-b3bb-c046d2fd9f1c || echo "Skipping CodeCov"