devilbox/.travis.yml

400 lines
12 KiB
YAML
Raw Normal View History

2019-11-23 11:41:57 +00:00
---
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
###
### Specify combinations
2016-11-03 13:48:09 +00:00
###
env:
2018-12-27 12:02:57 +00:00
###
### Check PHP Modules
###
- S1=MODULES
2018-06-03 18:45:01 +00:00
###
### Check Documentation
###
2019-12-01 12:14:00 +00:00
- S1=DOCUMENTATION V1=Build
- S1=DOCUMENTATION V1=linkcheck
- S1=DOCUMENTATION V1=linkcheck2
2018-06-03 18:45:01 +00:00
2018-08-11 23:21:37 +00:00
###
### Check Update script
2018-08-11 23:21:37 +00:00
###
- 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
2018-12-09 00:55:12 +00:00
- 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
2018-12-09 00:55:12 +00:00
# 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
2018-12-09 00:55:12 +00:00
# 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
2018-12-09 00:55:12 +00:00
# 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
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.
###
###
### 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
2018-11-02 21:55:15 +00:00
- S1=PHP V1=7.4 S2=HTTPD V2=apache-2.2
2019-02-09 15:51:40 +00:00
- S1=PHP V1=8.0 S2=HTTPD V2=apache-2.2
2020-11-07 10:17:59 +00:00
- S1=PHP V1=8.1 S2=HTTPD V2=apache-2.2
# 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
2018-11-02 21:55:15 +00:00
- S1=PHP V1=7.4 S2=HTTPD V2=apache-2.4
2019-02-09 15:51:40 +00:00
- S1=PHP V1=8.0 S2=HTTPD V2=apache-2.4
2020-11-07 10:17:59 +00:00
- S1=PHP V1=8.1 S2=HTTPD V2=apache-2.4
# 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
2018-11-02 21:55:15 +00:00
- S1=PHP V1=7.4 S2=HTTPD V2=nginx-stable
2019-02-09 15:51:40 +00:00
- S1=PHP V1=8.0 S2=HTTPD V2=nginx-stable
2020-11-07 10:17:59 +00:00
- S1=PHP V1=8.1 S2=HTTPD V2=nginx-stable
# 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
2018-11-02 21:55:15 +00:00
- S1=PHP V1=7.4 S2=HTTPD V2=nginx-mainline
2019-02-09 15:51:40 +00:00
- S1=PHP V1=8.0 S2=HTTPD V2=nginx-mainline
2020-11-07 10:17:59 +00:00
- S1=PHP V1=8.1 S2=HTTPD V2=nginx-mainline
###
### Test all other bundled services
###
2020-11-07 10:17:59 +00:00
### PHP 7.4 vs XYZ
###
# PHP 7.4 vs MySQL
- S1=PHP V1=7.4 S2=MYSQL V2=mysql-5.5
- S1=PHP V1=7.4 S2=MYSQL V2=mysql-5.6
- S1=PHP V1=7.4 S2=MYSQL V2=mysql-5.7
- S1=PHP V1=7.4 S2=MYSQL V2=mysql-8.0
- S1=PHP V1=7.4 S2=MYSQL V2=mariadb-5.5
- S1=PHP V1=7.4 S2=MYSQL V2=mariadb-10.0
- S1=PHP V1=7.4 S2=MYSQL V2=mariadb-10.1
- S1=PHP V1=7.4 S2=MYSQL V2=mariadb-10.2
- S1=PHP V1=7.4 S2=MYSQL V2=mariadb-10.3
- S1=PHP V1=7.4 S2=MYSQL V2=mariadb-10.4
2020-11-08 14:42:00 +00:00
- S1=PHP V1=7.4 S2=MYSQL V2=mariadb-10.5
2020-11-07 10:17:59 +00:00
- S1=PHP V1=7.4 S2=MYSQL V2=percona-5.5
- S1=PHP V1=7.4 S2=MYSQL V2=percona-5.6
- S1=PHP V1=7.4 S2=MYSQL V2=percona-5.7
- S1=PHP V1=7.4 S2=MYSQL V2=percona-8.0
# PHP 7.4 vs PgSQL
- S1=PHP V1=7.4 S2=PGSQL V2=9.0
- S1=PHP V1=7.4 S2=PGSQL V2=9.1
- S1=PHP V1=7.4 S2=PGSQL V2=9.2
- S1=PHP V1=7.4 S2=PGSQL V2=9.2-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=9.3
- S1=PHP V1=7.4 S2=PGSQL V2=9.3-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=9.4
- S1=PHP V1=7.4 S2=PGSQL V2=9.4-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=9.5
- S1=PHP V1=7.4 S2=PGSQL V2=9.5-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=9.6
- S1=PHP V1=7.4 S2=PGSQL V2=9.6-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=10.0
- S1=PHP V1=7.4 S2=PGSQL V2=10.0-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=10.1
- S1=PHP V1=7.4 S2=PGSQL V2=10.1-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=10.2
- S1=PHP V1=7.4 S2=PGSQL V2=10.2-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=10.3
- S1=PHP V1=7.4 S2=PGSQL V2=10.3-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=10.4
- S1=PHP V1=7.4 S2=PGSQL V2=10.4-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=10.5
- S1=PHP V1=7.4 S2=PGSQL V2=10.5-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=10.6
- S1=PHP V1=7.4 S2=PGSQL V2=10.6-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=11.0
- S1=PHP V1=7.4 S2=PGSQL V2=11.0-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=11.1
- S1=PHP V1=7.4 S2=PGSQL V2=11.1-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=11.2
- S1=PHP V1=7.4 S2=PGSQL V2=11.2-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=11.3
- S1=PHP V1=7.4 S2=PGSQL V2=11.3-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=11.4
- S1=PHP V1=7.4 S2=PGSQL V2=11.4-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=11.5
- S1=PHP V1=7.4 S2=PGSQL V2=11.5-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=11.6
- S1=PHP V1=7.4 S2=PGSQL V2=11.6-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=11.7
- S1=PHP V1=7.4 S2=PGSQL V2=11.7-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=11.8
- S1=PHP V1=7.4 S2=PGSQL V2=11.8-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=11.9
- S1=PHP V1=7.4 S2=PGSQL V2=11.9-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=12.0
- S1=PHP V1=7.4 S2=PGSQL V2=12.0-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=12.1
- S1=PHP V1=7.4 S2=PGSQL V2=12.1-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=12.2
- S1=PHP V1=7.4 S2=PGSQL V2=12.2-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=12.3
- S1=PHP V1=7.4 S2=PGSQL V2=12.3-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=12.4
- S1=PHP V1=7.4 S2=PGSQL V2=12.4-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=13.0
- S1=PHP V1=7.4 S2=PGSQL V2=13.0-alpine
- S1=PHP V1=7.4 S2=PGSQL V2=latest
- S1=PHP V1=7.4 S2=PGSQL V2=alpine
# PHP 7.4 vs Redis
- S1=PHP V1=7.4 S2=REDIS V2=2.8
- S1=PHP V1=7.4 S2=REDIS V2=3.0
- S1=PHP V1=7.4 S2=REDIS V2=3.0-alpine
- S1=PHP V1=7.4 S2=REDIS V2=3.2
- S1=PHP V1=7.4 S2=REDIS V2=3.2-alpine
- S1=PHP V1=7.4 S2=REDIS V2=4.0
- S1=PHP V1=7.4 S2=REDIS V2=4.0-alpine
- S1=PHP V1=7.4 S2=REDIS V2=5.0
- S1=PHP V1=7.4 S2=REDIS V2=5.0-alpine
- S1=PHP V1=7.4 S2=REDIS V2=6.0
- S1=PHP V1=7.4 S2=REDIS V2=6.0-alpine
- S1=PHP V1=7.4 S2=REDIS V2=latest
- S1=PHP V1=7.4 S2=REDIS V2=alpine
# PHP 7.4 vs Memcached
- S1=PHP V1=7.4 S2=MEMCD V2=1.4
- S1=PHP V1=7.4 S2=MEMCD V2=1.4-alpine
- S1=PHP V1=7.4 S2=MEMCD V2=1.5
- S1=PHP V1=7.4 S2=MEMCD V2=1.5-alpine
- S1=PHP V1=7.4 S2=MEMCD V2=1.6
- S1=PHP V1=7.4 S2=MEMCD V2=1.6-alpine
- S1=PHP V1=7.4 S2=MEMCD V2=latest
- S1=PHP V1=7.4 S2=MEMCD V2=alpine
# PHP 7.4 vs MongoDB
- S1=PHP V1=7.4 S2=MONGO V2=2.8
- S1=PHP V1=7.4 S2=MONGO V2=3.0
- S1=PHP V1=7.4 S2=MONGO V2=3.2
- S1=PHP V1=7.4 S2=MONGO V2=3.4
- S1=PHP V1=7.4 S2=MONGO V2=3.6
- S1=PHP V1=7.4 S2=MONGO V2=4.0
- S1=PHP V1=7.4 S2=MONGO V2=4.2
- S1=PHP V1=7.4 S2=MONGO V2=4.4
- S1=PHP V1=7.4 S2=MONGO V2=latest
2017-05-17 06:37:36 +00:00
2019-12-28 20:26:49 +00:00
#jobs:
# allow_failures:
# - env: S1=DOCUMENTATION V1=linkcheck2
2019-12-01 12:14:00 +00:00
2018-06-03 18:45:01 +00:00
###
### Installation
###
install:
2018-12-15 16:50:57 +00:00
# Update Debian/Ubuntu package index
2018-12-27 12:02:57 +00:00
- if [ "${S1}" != "MODULES" ] && [ "${S1}" != "DOCUMENTATION" ] && [ "${S1}" != "UPDATE" ]; then
until sudo apt-get update -qq; do sleep 5; done
2018-12-15 16:50:57 +00:00
fi
2018-12-09 00:55:12 +00:00
# Determine latest Docker version in apt
2018-12-15 16:50:57 +00:00
- DOCKER_APT="";
if [ "${S1}" = "DOCKER" ]; then
2018-12-09 00:55:12 +00:00
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;
2018-12-09 00:55:12 +00:00
echo "${DOCKER_APT}";
# Determine latest Docker Compose version
2018-12-15 16:50:57 +00:00
- 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
2018-12-27 12:02:57 +00:00
- 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;
2018-06-04 08:00:47 +00:00
chmod +x docker-compose;
sudo mv -f docker-compose /usr/local/bin;
fi
2019-12-01 12:14:00 +00:00
# Provide retry function
- retry() {
for ((n=0; n<60; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 1;
done;
return 1;
}
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
- sudo service mysql stop || true
2017-04-19 18:09:42 +00:00
- sudo service postgresql stop || true
- sudo service memcached stop || true
2017-05-23 20:56:39 +00:00
- 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
2017-04-19 17:48:44 +00:00
2018-06-04 08:00:47 +00:00
# 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:
2019-12-01 12:14:00 +00:00
###
### Test Modules
###
2018-12-27 12:02:57 +00:00
- if [ "${S1}" = "MODULES" ]; then
2019-11-23 11:41:57 +00:00
cd .tests/;
2019-12-01 12:14:00 +00:00
retry make update-readme;
fi
- if [ "${S1}" = "MODULES" ]; then
git diff --quiet || { echo "Build Changes"; git diff; git status; false; };
fi
###
### Test Documentation
###
- if [ "${S1}" = "DOCUMENTATION" ] && [ "${V1}" = "Build" ]; then
cd docs/;
retry make build;
fi
- if [ "${S1}" = "DOCUMENTATION" ] && [ "${V1}" = "linkcheck" ]; then
cd docs/;
retry make linkcheck;
fi
- if [ "${S1}" = "DOCUMENTATION" ] && [ "${V1}" = "linkcheck2" ]; then
2019-11-23 11:41:57 +00:00
cd docs/;
2019-12-01 12:14:00 +00:00
retry make linkcheck2;
fi
###
### Test Update script
###
- if [ "${S1}" = "UPDATE" ]; then
2019-11-23 11:41:57 +00:00
./update-docker.sh "${V1}";
2019-12-01 12:14:00 +00:00
fi
###
### Test Devilbox
###
- if [ "${S1}" != "MODULES" ] && [ "${S1}" != "DOCUMENTATION" ] && [ "${S1}" != "UPDATE" ]; then
2019-11-23 11:41:57 +00:00
cd .tests/;
2019-12-01 12:14:00 +00:00
fi
- if [ "${S1}" != "MODULES" ] && [ "${S1}" != "DOCUMENTATION" ] && [ "${S1}" != "UPDATE" ]; then
2019-11-23 11:41:57 +00:00
if [ "${S1}" != "DOCKER" ]; then
2019-12-28 20:26:49 +00:00
retry make configure KEY="${S1}_SERVER" VAL="${V1}" &&
2019-12-01 12:14:00 +00:00
retry make configure KEY="${S2}_SERVER" VAL="${V2}";
fi
fi
- if [ "${S1}" != "MODULES" ] && [ "${S1}" != "DOCUMENTATION" ] && [ "${S1}" != "UPDATE" ]; then
2019-12-28 20:26:49 +00:00
retry make start &&
retry make test-smoke-modules &&
retry make test-smoke-config &&
retry make test-smoke-intranet &&
retry make test-smoke-vendors &&
retry make test-smoke-vhosts &&
retry make test-smoke-rproxies &&
retry make test-smoke-ssl &&
retry make test-smoke-bind &&
retry make test-smoke-autostart &&
retry make test-smoke-framework-cakephp &&
retry make test-smoke-framework-drupal &&
retry make test-smoke-framework-wordpress &&
retry make test-smoke-container;
2018-06-03 18:45:01 +00:00
fi