2018-06-03 18:45:01 +00:00
|
|
|
###
|
|
|
|
### Enable Python support
|
|
|
|
###
|
|
|
|
language: python
|
|
|
|
|
2017-05-17 06:37:36 +00:00
|
|
|
###
|
|
|
|
### Enable sudo (required for docker service)
|
|
|
|
###
|
2016-12-26 20:44:04 +00:00
|
|
|
sudo: required
|
2016-11-03 13:48:09 +00:00
|
|
|
|
2016-12-26 02:54:59 +00:00
|
|
|
|
2016-12-26 14:13:46 +00:00
|
|
|
###
|
2016-12-26 20:44:04 +00:00
|
|
|
### Attach services
|
2016-11-03 13:48:09 +00:00
|
|
|
###
|
2016-12-26 20:44:04 +00:00
|
|
|
services:
|
|
|
|
- docker
|
2016-11-03 13:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
###
|
2017-05-17 06:45:31 +00:00
|
|
|
### Specify combinations
|
2016-11-03 13:48:09 +00:00
|
|
|
###
|
|
|
|
env:
|
2018-06-03 18:45:01 +00:00
|
|
|
###
|
|
|
|
### Check Documentation
|
|
|
|
###
|
|
|
|
- S1=DOCUMENTATION
|
|
|
|
|
2017-05-17 06:37:36 +00:00
|
|
|
###
|
|
|
|
### The matrix specifies 2 versions to compare against each other.
|
2018-03-07 00:15:58 +00:00
|
|
|
### As PHP (any version) needs to be able to run with everything,
|
2017-05-17 06:37:36 +00:00
|
|
|
### I am going to test any PHP version against any other service.
|
|
|
|
###
|
2017-05-17 06:45:31 +00:00
|
|
|
###
|
|
|
|
### PHP vs WWW
|
|
|
|
###
|
|
|
|
# PHP vs Apache 2.2
|
2018-05-12 17:58:29 +00:00
|
|
|
- S1=PHP V1=5.3 S2=HTTPD V2=apache-2.2
|
2018-03-06 07:50:29 +00:00
|
|
|
- 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
|
2018-05-13 15:21:32 +00:00
|
|
|
- S1=PHP V1=7.3 S2=HTTPD V2=apache-2.2
|
2017-05-17 06:45:31 +00:00
|
|
|
# PHP vs Apache 2.4
|
2018-05-12 17:58:29 +00:00
|
|
|
- S1=PHP V1=5.3 S2=HTTPD V2=apache-2.4
|
2018-03-06 07:50:29 +00:00
|
|
|
- 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
|
2018-05-13 15:21:32 +00:00
|
|
|
- S1=PHP V1=7.3 S2=HTTPD V2=apache-2.4
|
2017-05-17 06:45:31 +00:00
|
|
|
# PHP vs Nginx stable
|
2018-05-12 17:58:29 +00:00
|
|
|
- S1=PHP V1=5.3 S2=HTTPD V2=nginx-stable
|
2018-03-06 07:50:29 +00:00
|
|
|
- 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
|
2018-05-13 15:21:32 +00:00
|
|
|
- S1=PHP V1=7.3 S2=HTTPD V2=nginx-stable
|
2017-05-17 06:45:31 +00:00
|
|
|
# PHP vs Nginx mainline
|
2018-05-12 17:58:29 +00:00
|
|
|
- S1=PHP V1=5.3 S2=HTTPD V2=nginx-mainline
|
2018-03-06 07:50:29 +00:00
|
|
|
- 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
|
2018-05-13 15:21:32 +00:00
|
|
|
- S1=PHP V1=7.3 S2=HTTPD V2=nginx-mainline
|
2017-05-17 06:45:31 +00:00
|
|
|
|
|
|
|
###
|
2018-05-12 17:58:29 +00:00
|
|
|
### MYSQL
|
2017-05-17 06:45:31 +00:00
|
|
|
###
|
2018-03-06 07:50:29 +00:00
|
|
|
- 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=mariadb-10.3
|
|
|
|
- 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
|
2017-05-17 06:45:31 +00:00
|
|
|
|
|
|
|
###
|
2018-05-12 17:58:29 +00:00
|
|
|
### PostgreSQL
|
2017-05-17 06:45:31 +00:00
|
|
|
###
|
2018-03-06 07:50:29 +00:00
|
|
|
- S1=PHP V1=7.2 S2=PGSQL V2=9.2
|
|
|
|
- S1=PHP V1=7.2 S2=PGSQL V2=9.3
|
|
|
|
- S1=PHP V1=7.2 S2=PGSQL V2=9.4
|
|
|
|
- S1=PHP V1=7.2 S2=PGSQL V2=9.5
|
|
|
|
- S1=PHP V1=7.2 S2=PGSQL V2=9.6
|
|
|
|
- S1=PHP V1=7.2 S2=PGSQL V2=10.0
|
2017-05-17 06:37:36 +00:00
|
|
|
|
|
|
|
|
2018-06-03 18:45:01 +00:00
|
|
|
###
|
|
|
|
### Installation
|
|
|
|
###
|
|
|
|
install:
|
|
|
|
# Install dependencies for documentation
|
|
|
|
- if [ "${S1}" = "DOCUMENTATION" ]; then
|
2018-06-05 12:15:54 +00:00
|
|
|
max=100; i=0;
|
|
|
|
while [ $i -lt $max ]; do
|
|
|
|
if pip install sphinx; then break; else i=$((i+1)); fi
|
|
|
|
done;
|
|
|
|
|
|
|
|
max=100; i=0;
|
|
|
|
while [ $i -lt $max ]; do
|
|
|
|
if pip install sphinx-autobuild; then break; else i=$((i+1)); fi
|
|
|
|
done;
|
|
|
|
|
|
|
|
max=100; i=0;
|
|
|
|
while [ $i -lt $max ]; do
|
|
|
|
if pip install recommonmark; then break; else i=$((i+1)); fi
|
|
|
|
done;
|
|
|
|
|
|
|
|
max=100; i=0;
|
|
|
|
while [ $i -lt $max ]; do
|
|
|
|
if pip install sphinx_rtd_theme; then break; else i=$((i+1)); fi
|
|
|
|
done;
|
2018-06-03 18:45:01 +00:00
|
|
|
fi
|
|
|
|
|
2018-06-04 08:00:47 +00:00
|
|
|
# Install dependencies for docker/docker-compose
|
|
|
|
- if [ "${S1}" != "DOCUMENTATION" ]; then
|
|
|
|
max=100; i=0;
|
|
|
|
while [ $i -lt $max ]; do
|
|
|
|
if sudo apt-get update; then break; else i=$((i+1)); fi
|
|
|
|
done;
|
|
|
|
|
|
|
|
max=100; i=0;
|
|
|
|
while [ $i -lt $max ]; do
|
|
|
|
if sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce; then break; else i=$((i+1)); fi
|
|
|
|
done;
|
|
|
|
|
|
|
|
max=100; i=0;
|
|
|
|
while [ $i -lt $max ]; do
|
|
|
|
if curl -L --retry 100 --retry-max-time 0 https://github.com/docker/compose/releases/download/1.13.0/docker-compose-`uname -s`-`uname -m` > docker-compose; then break; else i=$((i+1)); fi
|
|
|
|
done;
|
|
|
|
|
|
|
|
chmod +x docker-compose;
|
|
|
|
sudo mv -f docker-compose /usr/local/bin;
|
|
|
|
fi
|
|
|
|
|
2018-06-03 18:45:01 +00:00
|
|
|
|
2017-05-17 06:37:36 +00:00
|
|
|
###
|
|
|
|
### Before Script
|
|
|
|
###
|
2017-04-19 17:48:44 +00:00
|
|
|
before_script:
|
|
|
|
# Disable services enabled by default
|
|
|
|
# http://docs.travis-ci.com/user/database-setup/#MySQL
|
2017-05-17 06:45:31 +00:00
|
|
|
- sudo /etc/init.d/mysql stop || true
|
2017-05-10 20:00:16 +00:00
|
|
|
- sudo /etc/init.d/postgresql stop || true
|
2017-05-17 06:45:31 +00:00
|
|
|
- sudo /etc/init.d/memcached stop || true
|
2017-05-23 20:56:39 +00:00
|
|
|
- sudo /etc/init.d/redis stop || true
|
|
|
|
- sudo /etc/init.d/mongodb stop || true
|
|
|
|
|
2017-05-17 06:45:31 +00:00
|
|
|
- sudo service mysql stop || true
|
2017-04-19 18:09:42 +00:00
|
|
|
- sudo service postgresql stop || true
|
2017-05-17 06:45:31 +00:00
|
|
|
- sudo service memcached stop || true
|
2017-05-23 20:56:39 +00:00
|
|
|
- sudo service redis stop || true
|
|
|
|
- sudo service mongodb stop || true
|
2017-05-17 06:45:31 +00:00
|
|
|
- netstat -tulpn
|
2017-04-19 17:48:44 +00:00
|
|
|
|
2018-06-04 08:00:47 +00:00
|
|
|
# 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
|
|
|
|
|
2017-04-19 17:48:44 +00:00
|
|
|
|
2016-11-15 19:45:57 +00:00
|
|
|
###
|
|
|
|
### Test
|
|
|
|
###
|
|
|
|
script:
|
2018-06-03 18:45:01 +00:00
|
|
|
- if [ "${S1}" = "DOCUMENTATION" ]; then
|
|
|
|
cd docs/;
|
2018-06-30 15:36:11 +00:00
|
|
|
make build;
|
|
|
|
make linkcheck;
|
2018-06-03 18:45:01 +00:00
|
|
|
else
|
|
|
|
.tests/test_single.sh . "${S1}" "${V1}" "${S2}" "${V2}";
|
|
|
|
fi
|