forked from cytopia/devilbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
303 lines (280 loc) · 9.29 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
###
### Enable Python support
###
language: python
###
### Enable sudo (required for docker service)
###
sudo: required
###
### Attach services
###
services:
- docker
###
### Specify combinations
###
env:
###
### Check PHP Modules
###
- S1=MODULES
###
### Check Documentation
###
- S1=DOCUMENTATION
###
### Check Update script
###
- S1=UPDATE V1=php
- S1=UPDATE V1=httpd
- S1=UPDATE V1=mysql
- S1=UPDATE V1=rest
###
### Test various Docker/DockerCompose versions
###
### Docker versions: https://github.com/docker/docker-ce/releases
### Compose versions: https://github.com/docker/compose/releases
###
# Latest Docker version against various DockerCompose versions
- S1=DOCKER V1=1 S2=COMPOSE V2=1
- S1=DOCKER V1=1 S2=COMPOSE V2=2
- S1=DOCKER V1=1 S2=COMPOSE V2=3
- S1=DOCKER V1=1 S2=COMPOSE V2=4
- S1=DOCKER V1=1 S2=COMPOSE V2=5
# 2nd Latest Docker version against various DockerCompose versions
- S1=DOCKER V1=2 S2=COMPOSE V2=1
- S1=DOCKER V1=2 S2=COMPOSE V2=2
- S1=DOCKER V1=2 S2=COMPOSE V2=3
- S1=DOCKER V1=2 S2=COMPOSE V2=4
- S1=DOCKER V1=2 S2=COMPOSE V2=5
# 3rd Latest Docker version against various DockerCompose versions
- S1=DOCKER V1=3 S2=COMPOSE V2=1
- S1=DOCKER V1=3 S2=COMPOSE V2=2
- S1=DOCKER V1=3 S2=COMPOSE V2=3
- S1=DOCKER V1=3 S2=COMPOSE V2=4
- S1=DOCKER V1=3 S2=COMPOSE V2=5
# 4th Latest Docker version against various DockerCompose versions
- S1=DOCKER V1=4 S2=COMPOSE V2=1
- S1=DOCKER V1=4 S2=COMPOSE V2=2
- S1=DOCKER V1=4 S2=COMPOSE V2=3
- S1=DOCKER V1=4 S2=COMPOSE V2=4
- S1=DOCKER V1=4 S2=COMPOSE V2=5
# 5th Latest Docker version against various DockerCompose versions
- S1=DOCKER V1=5 S2=COMPOSE V2=1
- S1=DOCKER V1=5 S2=COMPOSE V2=2
- S1=DOCKER V1=5 S2=COMPOSE V2=3
- S1=DOCKER V1=5 S2=COMPOSE V2=4
- S1=DOCKER V1=5 S2=COMPOSE V2=5
###
### The matrix specifies 2 versions to compare against each other.
### As PHP (any version) needs to be able to run with everything,
### I am going to test any PHP version against any other service.
###
###
### PHP vs WWW
###
# PHP vs Apache 2.2
- S1=PHP V1=5.3 S2=HTTPD V2=apache-2.2
- S1=PHP V1=5.4 S2=HTTPD V2=apache-2.2
- S1=PHP V1=5.5 S2=HTTPD V2=apache-2.2
- S1=PHP V1=5.6 S2=HTTPD V2=apache-2.2
- S1=PHP V1=7.0 S2=HTTPD V2=apache-2.2
- S1=PHP V1=7.1 S2=HTTPD V2=apache-2.2
- S1=PHP V1=7.2 S2=HTTPD V2=apache-2.2
- S1=PHP V1=7.3 S2=HTTPD V2=apache-2.2
- S1=PHP V1=7.4 S2=HTTPD V2=apache-2.2
# PHP vs Apache 2.4
- S1=PHP V1=5.3 S2=HTTPD V2=apache-2.4
- S1=PHP V1=5.4 S2=HTTPD V2=apache-2.4
- S1=PHP V1=5.5 S2=HTTPD V2=apache-2.4
- S1=PHP V1=5.6 S2=HTTPD V2=apache-2.4
- S1=PHP V1=7.0 S2=HTTPD V2=apache-2.4
- S1=PHP V1=7.1 S2=HTTPD V2=apache-2.4
- S1=PHP V1=7.2 S2=HTTPD V2=apache-2.4
- S1=PHP V1=7.3 S2=HTTPD V2=apache-2.4
- S1=PHP V1=7.4 S2=HTTPD V2=apache-2.4
# PHP vs Nginx stable
- S1=PHP V1=5.3 S2=HTTPD V2=nginx-stable
- S1=PHP V1=5.4 S2=HTTPD V2=nginx-stable
- S1=PHP V1=5.5 S2=HTTPD V2=nginx-stable
- S1=PHP V1=5.6 S2=HTTPD V2=nginx-stable
- S1=PHP V1=7.0 S2=HTTPD V2=nginx-stable
- S1=PHP V1=7.1 S2=HTTPD V2=nginx-stable
- S1=PHP V1=7.2 S2=HTTPD V2=nginx-stable
- S1=PHP V1=7.3 S2=HTTPD V2=nginx-stable
- S1=PHP V1=7.4 S2=HTTPD V2=nginx-stable
# PHP vs Nginx mainline
- S1=PHP V1=5.3 S2=HTTPD V2=nginx-mainline
- S1=PHP V1=5.4 S2=HTTPD V2=nginx-mainline
- S1=PHP V1=5.5 S2=HTTPD V2=nginx-mainline
- S1=PHP V1=5.6 S2=HTTPD V2=nginx-mainline
- S1=PHP V1=7.0 S2=HTTPD V2=nginx-mainline
- S1=PHP V1=7.1 S2=HTTPD V2=nginx-mainline
- S1=PHP V1=7.2 S2=HTTPD V2=nginx-mainline
- S1=PHP V1=7.3 S2=HTTPD V2=nginx-mainline
- S1=PHP V1=7.4 S2=HTTPD V2=nginx-mainline
###
### Test all other bundled services
###
### PHP 7.2 vs XYZ
###
# PHP 7.2 vs MySQL
- S1=PHP V1=7.2 S2=MYSQL V2=mysql-5.5
- S1=PHP V1=7.2 S2=MYSQL V2=mysql-5.6
- S1=PHP V1=7.2 S2=MYSQL V2=mysql-5.7
- S1=PHP V1=7.2 S2=MYSQL V2=mysql-8.0
- S1=PHP V1=7.2 S2=MYSQL V2=mariadb-5.5
- S1=PHP V1=7.2 S2=MYSQL V2=mariadb-10.0
- S1=PHP V1=7.2 S2=MYSQL V2=mariadb-10.1
- S1=PHP V1=7.2 S2=MYSQL V2=mariadb-10.2
- S1=PHP V1=7.2 S2=MYSQL V2=percona-5.5
- S1=PHP V1=7.2 S2=MYSQL V2=percona-5.6
- S1=PHP V1=7.2 S2=MYSQL V2=percona-5.7
# PHP 7.2 vs PgSQL
- S1=PHP V1=7.2 S2=PGSQL V2=9.0
- S1=PHP V1=7.2 S2=PGSQL V2=9.1
- S1=PHP V1=7.2 S2=PGSQL V2=9.2
- S1=PHP V1=7.2 S2=PGSQL V2=9.2-alpine
- S1=PHP V1=7.2 S2=PGSQL V2=9.3
- S1=PHP V1=7.2 S2=PGSQL V2=9.3-alpine
- S1=PHP V1=7.2 S2=PGSQL V2=9.4
- S1=PHP V1=7.2 S2=PGSQL V2=9.4-alpine
- S1=PHP V1=7.2 S2=PGSQL V2=9.5
- S1=PHP V1=7.2 S2=PGSQL V2=9.5-alpine
- S1=PHP V1=7.2 S2=PGSQL V2=9.6
- S1=PHP V1=7.2 S2=PGSQL V2=9.6-alpine
- S1=PHP V1=7.2 S2=PGSQL V2=10.0
- S1=PHP V1=7.2 S2=PGSQL V2=10.0-alpine
- S1=PHP V1=7.2 S2=PGSQL V2=10.1
- S1=PHP V1=7.2 S2=PGSQL V2=10.1-alpine
- S1=PHP V1=7.2 S2=PGSQL V2=10.2
- S1=PHP V1=7.2 S2=PGSQL V2=10.2-alpine
- S1=PHP V1=7.2 S2=PGSQL V2=10.3
- S1=PHP V1=7.2 S2=PGSQL V2=10.3-alpine
- S1=PHP V1=7.2 S2=PGSQL V2=10.4
- S1=PHP V1=7.2 S2=PGSQL V2=10.4-alpine
- S1=PHP V1=7.2 S2=PGSQL V2=10.5
- S1=PHP V1=7.2 S2=PGSQL V2=10.5-alpine
- S1=PHP V1=7.2 S2=PGSQL V2=10.6
- S1=PHP V1=7.2 S2=PGSQL V2=10.6-alpine
- S1=PHP V1=7.2 S2=PGSQL V2=11.0
- S1=PHP V1=7.2 S2=PGSQL V2=11.0-alpine
- S1=PHP V1=7.2 S2=PGSQL V2=11.1
- S1=PHP V1=7.2 S2=PGSQL V2=11.1-alpine
# PHP 7.2 vs Redis
- S1=PHP V1=7.2 S2=REDIS V2=2.8
- S1=PHP V1=7.2 S2=REDIS V2=3.0
- S1=PHP V1=7.2 S2=REDIS V2=3.0-alpine
- S1=PHP V1=7.2 S2=REDIS V2=3.2
- S1=PHP V1=7.2 S2=REDIS V2=3.2-alpine
- S1=PHP V1=7.2 S2=REDIS V2=4.0
- S1=PHP V1=7.2 S2=REDIS V2=4.0-alpine
- S1=PHP V1=7.2 S2=REDIS V2=5.0
- S1=PHP V1=7.2 S2=REDIS V2=5.0-alpine
# PHP 7.2 vs Memcached
- S1=PHP V1=7.2 S2=MEMCD V2=1.4
- S1=PHP V1=7.2 S2=MEMCD V2=1.4-alpine
- S1=PHP V1=7.2 S2=MEMCD V2=1.5
- S1=PHP V1=7.2 S2=MEMCD V2=1.5-alpine
# PHP 7.2 vs MongoDB
- S1=PHP V1=7.2 S2=MONGO V2=2.8
- S1=PHP V1=7.2 S2=MONGO V2=3.0
- S1=PHP V1=7.2 S2=MONGO V2=3.2
- S1=PHP V1=7.2 S2=MONGO V2=3.4
- S1=PHP V1=7.2 S2=MONGO V2=3.6
- S1=PHP V1=7.2 S2=MONGO V2=4.0
###
### Installation
###
install:
# Update Debian/Ubuntu package index
- if [ "${S1}" != "MODULES" ] && [ "${S1}" != "DOCUMENTATION" ] && [ "${S1}" != "UPDATE" ]; then
until sudo apt-get update -qq; do sleep 5; done
fi
# Install dependencies for documentation
- if [ "${S1}" = "DOCUMENTATION" ]; then
until pip install sphinx; do sleep 5; done;
until pip install sphinx-autobuild; do sleep 5; done;
until pip install recommonmark; do sleep 5; done;
until pip install sphinx_rtd_theme; do sleep 5; done;
fi
# Determine latest Docker version in apt
- DOCKER_APT="";
if [ "${S1}" = "DOCKER" ]; then
DOCKER_APT="$( curl -sS https://raw.githubusercontent.com/cytopia/tools/master/docker-apt-versions | sh -s "${V1}" )";
fi;
if [ -n "${DOCKER_APT}" ]; then
DOCKER_APT="=${DOCKER_APT}";
fi;
echo "${DOCKER_APT}";
# Determine latest Docker Compose version
- if [ "${S2}" = "COMPOSE" ]; then
COMPOSE_VERSION="$( curl -sS https://raw.githubusercontent.com/cytopia/tools/master/docker-compose-versions | sh -s "${V2}" )";
else
COMPOSE_VERSION="$( curl -sS https://raw.githubusercontent.com/cytopia/tools/master/docker-compose-versions | sh -s 1 )";
fi;
echo "${COMPOSE_VERSION}";
# Install Docker and Docker Compose
- if [ "${S1}" != "MODULES" ] && [ "${S1}" != "DOCUMENTATION" ] && [ "${S1}" != "UPDATE" ]; then
until sudo apt-get -y -qq -o Dpkg::Options::="--force-confnew" install docker-ce${DOCKER_APT}; do sleep 5; done;
until curl -L -sS https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose; do sleep 5; done;
chmod +x docker-compose;
sudo mv -f docker-compose /usr/local/bin;
fi
###
### Before Script
###
before_script:
# Disable services enabled by default
# http://docs.travis-ci.com/user/database-setup/#MySQL
- sudo service mysql stop || true
- sudo service postgresql stop || true
- sudo service memcached stop || true
- sudo service redis stop || true
- sudo service mongodb stop || true
- netstat -tuln
# Ensure Docker is restarted
- sudo service docker stop || true
- sudo service docker start || true
# Show Python/pip
- if [ "${S1}" = "DOCUMENTATION" ]; then
pip freeze;
pip --version;
python --version;
fi
# Show Docker/Docker Compose
- if [ "${S1}" != "DOCUMENTATION" ]; then
docker --version;
docker-compose --version;
fi
###
### Test
###
script:
- if [ "${S1}" = "MODULES" ]; then
cd .tests/;
make update-readme;
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
elif [ "${S1}" = "DOCUMENTATION" ]; then
cd docs/;
make build;
make linkcheck;
make linkcheck2;
elif [ "${S1}" = "UPDATE" ]; then
./update-docker.sh "${V1}";
elif [ "${S1}" = "DOCKER" ]; then
cd .tests/;
make init;
make start;
make info;
make test;
else
cd .tests/;
make init;
make configure SRV="${S1}_SERVER" VER="${V1}";
make configure SRV="${S2}_SERVER" VER="${V2}";
make start;
make info;
make test;
fi