-
Notifications
You must be signed in to change notification settings - Fork 36
/
.travis.yml
60 lines (52 loc) · 1.84 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
55
56
57
58
59
60
language: go
before_install:
- go get honnef.co/go/tools/cmd/staticcheck
# install consul
- wget https://releases.hashicorp.com/consul/1.5.3/consul_1.5.3_linux_amd64.zip
- unzip consul_1.5.3_linux_amd64.zip
- sudo mv consul /bin/
- consul agent -server -bootstrap-expect 1 -data-dir /tmp/consul -bind 127.0.0.1 &
# install etcd
- curl -L https://github.com/etcd-io/etcd/releases/download/v3.3.13/etcd-v3.3.13-linux-amd64.tar.gz -o etcd-v3.3.13-linux-amd64.tar.gz
- tar xzf etcd-v3.3.13-linux-amd64.tar.gz
- sudo mv etcd-v3.3.13-linux-amd64/etcd /bin/
- sudo mv etcd-v3.3.13-linux-amd64/etcdctl /bin/
- etcd &
# Install vault
- wget https://releases.hashicorp.com/vault/1.2.1/vault_1.2.1_linux_amd64.zip
- unzip vault_1.2.1_linux_amd64.zip
- sudo mv vault /bin/
- vault server -dev &
# Install zookeeper
- wget https://archive.apache.org/dist/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz
- tar xzf zookeeper-3.4.9.tar.gz
- echo "tickTime=2000" > zookeeper-3.4.9/conf/zoo.cfg
- echo "dataDir=/tmp/zookeeper" >> zookeeper-3.4.9/conf/zoo.cfg
- echo "clientPort=2181" >> zookeeper-3.4.9/conf/zoo.cfg
- mkdir /tmp/zookeeper
- zookeeper-3.4.9/bin/zkServer.sh start
# https://github.com/travis-ci/travis-ci/issues/8229
- export GOROOT=$(go env GOROOT)
install:
- make build
- sudo make install
go:
- 1.12.x
- 1.13.x
env:
- VAULT_ADDR='http://127.0.0.1:8200' GO111MODULE=on
services:
- redis
before_script:
- go vet $(go list ./... | grep -v /vendor/)
- staticcheck $(go list ./... | grep -v /vendor/)
script:
- ./test
- bash integration/consul/test.sh
- bash integration/etcdv2/test.sh
- bash integration/etcdv3/test.sh
- bash integration/file/test.sh
- bash integration/vault/test.sh
- bash integration/redis/test.sh
- bash integration/env/test.sh
- bash integration/zookeeper/test.sh