forked from aerospike/aerospike-client-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
54 lines (50 loc) · 1.89 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
48
49
50
51
52
53
54
language: go
go:
- 1.2
- 1.3
- 1.4
- tip
matrix:
allow_failures:
- go: tip
install:
- if [ -d "$HOME/gopath/src/github.com/citrusleaf" ]; then mv $HOME/gopath/src/github.com/citrusleaf $HOME/gopath/src/github.com/aerospike; fi
- export PATH=$PATH:$HOME/gopath/bin
- go get github.com/onsi/ginkgo/ginkgo
- go get github.com/onsi/gomega
# We like to run the tests with coverage.
# - if [[ "${TRAVIS_GO_VERSION}" = "tip" ]]; then go get -u golang.org/x/tools/cmd/cover; else go get -u code.google.com/p/go.tools/cmd/cover; fi
- if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
- wget -O aerospike-server.tgz http://aerospike.com/download/server/latest/artifact/tgz
- tar xvzf aerospike-server.tgz
- cp -f .travis/aerospike.conf ./aerospike-server/share/etc
- cd aerospike-server
- mkdir instance1
- mkdir instance2
- ./bin/aerospike init --home instance1 --instance 1 --service-port 3000
- ./bin/aerospike init --home instance2 --instance 2 --service-port 3010
- cd instance1
- sudo ./bin/aerospike start
- cd ../..
- pwd
- sleep 5
# dump and keep server log for debugging
- sudo tail -n 1000 aerospike-server/instance1/var/log/aerospike.log
script:
# build all tools
- find tools -name "*.go" -type f -exec go -- build {} ';'
# build all examples - only include files with *.go pattern in
# the examples, and not its sub-directories
- find examples -name "*.go" -type f -exec go -- build {} ';'
# run tests in single instance mode
- ginkgo -cover -r -race -keepGoing -succinct -randomizeSuites
# run tests in multiple instance mode
- cd aerospike-server/instance1
- sudo ./bin/aerospike restart
- cd ../instance2
- sudo ./bin/aerospike start
- cd ../..
# make sure the instances are up and clean
- sleep 5
- ginkgo -cover -r -race -keepGoing -succinct -randomizeSuites
- .travis/proxy_check.sh