forked from api7/lua-resty-etcd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (57 loc) · 1.97 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
61
62
63
os: linux
dist: xenial
sudo: required
addons:
apt:
packages:
- cpanminus
- build-essential
- libncurses5-dev
- libpcre3-dev
- libreadline-dev
- libssl-dev
- perl
- luarocks
# install golang environment
- golang-go
matrix:
fast_finish: true
include:
- env: ETCD_VER=2.2.5 GOREMAN_CONF=Procfile-single
- env: ETCD_VER=3.1.0 GOREMAN_CONF=Procfile-single
- env: ETCD_VER=3.2.0 GOREMAN_CONF=Procfile-single
- env: ETCD_VER=3.3.0 GOREMAN_CONF=Procfile-single-enable-v2
- env: ETCD_VER=3.4.0 GOREMAN_CONF=Procfile-single-enable-v2
env:
global:
- OPENRESTY_PREFIX=/usr/local/openresty
- AUTH_ENDPOINT_V2=http://127.0.0.1:12379
- AUTH_ENDPOINT_V3=127.0.0.1:12379
- AUTH_USER=root
- AUTH_PWD=abc123
install:
- git clone https://github.com/openresty/test-nginx.git test-nginx
- sudo make dev
- wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
- sudo apt-get -y install software-properties-common
- sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"
- sudo apt-get update
- sudo apt-get install openresty
- wget https://github.com/etcd-io/etcd/releases/download/v$ETCD_VER/etcd-v$ETCD_VER-linux-amd64.tar.gz
- tar xf etcd-v$ETCD_VER-linux-amd64.tar.gz
# run etcd local cluster, startup at localhost:2379, localhost:22379, and localhost:32379
# see more https://github.com/etcd-io/etcd/blob/master/Documentation/dev-guide/local_cluster.md
- go get github.com/mattn/goreman
script:
- cd test-nginx && (sudo cpanm --notest . > build.log 2>&1 || (cat build.log && exit 1)) && cd ..
- export PATH=$OPENRESTY_PREFIX/nginx/sbin:$PWD/etcd-v$ETCD_VER-linux-amd64:$PATH
- etcd --version
- goreman -f ./t/$GOREMAN_CONF start > goreman.log 2>&1 &
- sleep 5
- chmod +x ./t/v2/add-auth.sh
- chmod +x ./t/v3/add-auth.sh
- ./t/v2/add-auth.sh
- ./t/v3/add-auth.sh
- cat goreman.log
- ps -ef | grep etcd
- make test