devilbox/.github/workflows/test-versions.yml

318 lines
8.7 KiB
YAML
Raw Normal View History

---
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
2019-11-21 14:20:35 +00:00
name: Versions
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
# Runs on Pull Requests
pull_request:
# Runs on master Branch and Tags
push:
branches:
- master
tags:
- '[0-9]+.[0-9]+*'
# -------------------------------------------------------------------------------------------------
# What to run
# -------------------------------------------------------------------------------------------------
jobs:
2019-11-21 14:20:35 +00:00
smoke_version:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
2019-11-21 14:20:35 +00:00
version:
- "MYSQL_SERVER=mysql-5.5"
- "MYSQL_SERVER=mysql-5.6"
- "MYSQL_SERVER=mysql-5.7"
- "MYSQL_SERVER=mysql-8.0"
- "MYSQL_SERVER=mariadb-5.5"
- "MYSQL_SERVER=mariadb-10.0"
- "MYSQL_SERVER=mariadb-10.1"
- "MYSQL_SERVER=mariadb-10.2"
- "MYSQL_SERVER=mariadb-10.3"
- "MYSQL_SERVER=mariadb-10.4"
2020-11-08 14:42:00 +00:00
- "MYSQL_SERVER=mariadb-10.5"
2022-01-27 07:15:46 +00:00
- "MYSQL_SERVER=mariadb-10.6"
- "MYSQL_SERVER=mariadb-10.7"
2019-11-21 14:20:35 +00:00
- "MYSQL_SERVER=percona-5.5"
- "MYSQL_SERVER=percona-5.6"
- "MYSQL_SERVER=percona-5.7"
- "MYSQL_SERVER=percona-8.0"
- "PGSQL_SERVER=9.0"
- "PGSQL_SERVER=9.1"
- "PGSQL_SERVER=9.2"
- "PGSQL_SERVER=9.2-alpine"
- "PGSQL_SERVER=9.3"
- "PGSQL_SERVER=9.3-alpine"
- "PGSQL_SERVER=9.4"
- "PGSQL_SERVER=9.4-alpine"
- "PGSQL_SERVER=9.5"
- "PGSQL_SERVER=9.5-alpine"
- "PGSQL_SERVER=9.6"
- "PGSQL_SERVER=9.6-alpine"
- "PGSQL_SERVER=10.0"
- "PGSQL_SERVER=10.0-alpine"
- "PGSQL_SERVER=10.1"
- "PGSQL_SERVER=10.1-alpine"
- "PGSQL_SERVER=10.2"
- "PGSQL_SERVER=10.2-alpine"
- "PGSQL_SERVER=10.3"
- "PGSQL_SERVER=10.3-alpine"
- "PGSQL_SERVER=10.4"
- "PGSQL_SERVER=10.4-alpine"
- "PGSQL_SERVER=10.5"
- "PGSQL_SERVER=10.5-alpine"
- "PGSQL_SERVER=10.6"
- "PGSQL_SERVER=10.6-alpine"
- "PGSQL_SERVER=11.0"
- "PGSQL_SERVER=11.0-alpine"
- "PGSQL_SERVER=11.1"
- "PGSQL_SERVER=11.1-alpine"
2019-11-24 09:25:29 +00:00
- "PGSQL_SERVER=11.2"
- "PGSQL_SERVER=11.2-alpine"
- "PGSQL_SERVER=11.3"
- "PGSQL_SERVER=11.3-alpine"
- "PGSQL_SERVER=11.4"
- "PGSQL_SERVER=11.4-alpine"
- "PGSQL_SERVER=11.5"
- "PGSQL_SERVER=11.5-alpine"
- "PGSQL_SERVER=11.6"
- "PGSQL_SERVER=11.6-alpine"
2020-11-07 10:17:59 +00:00
- "PGSQL_SERVER=11.7"
- "PGSQL_SERVER=11.7-alpine"
- "PGSQL_SERVER=11.8"
- "PGSQL_SERVER=11.8-alpine"
- "PGSQL_SERVER=11.9"
- "PGSQL_SERVER=11.9-alpine"
2019-11-24 09:25:29 +00:00
- "PGSQL_SERVER=12.0"
- "PGSQL_SERVER=12.0-alpine"
- "PGSQL_SERVER=12.1"
- "PGSQL_SERVER=12.1-alpine"
2020-11-07 10:17:59 +00:00
- "PGSQL_SERVER=12.2"
- "PGSQL_SERVER=12.2-alpine"
- "PGSQL_SERVER=12.3"
- "PGSQL_SERVER=12.3-alpine"
- "PGSQL_SERVER=13.0"
- "PGSQL_SERVER=13.0-alpine"
2019-11-21 14:20:35 +00:00
- "PGSQL_SERVER=latest"
- "PGSQL_SERVER=alpine"
- "REDIS_SERVER=2.8"
- "REDIS_SERVER=3.0"
- "REDIS_SERVER=3.0-alpine"
- "REDIS_SERVER=3.2"
- "REDIS_SERVER=3.2-alpine"
- "REDIS_SERVER=4.0"
- "REDIS_SERVER=4.0-alpine"
- "REDIS_SERVER=5.0"
- "REDIS_SERVER=5.0-alpine"
2020-11-07 10:17:59 +00:00
- "REDIS_SERVER=6.0"
- "REDIS_SERVER=6.0-alpine"
2019-11-21 14:20:35 +00:00
- "REDIS_SERVER=latest"
- "REDIS_SERVER=alpine"
- "MEMCD_SERVER=1.4"
- "MEMCD_SERVER=1.4-alpine"
- "MEMCD_SERVER=1.5"
- "MEMCD_SERVER=1.5-alpine"
2020-11-07 10:17:59 +00:00
- "MEMCD_SERVER=1.6"
- "MEMCD_SERVER=1.6-alpine"
2019-11-21 14:20:35 +00:00
- "MEMCD_SERVER=latest"
- "MEMCD_SERVER=alpine"
- "MONGO_SERVER=2.8"
- "MONGO_SERVER=3.0"
- "MONGO_SERVER=3.2"
- "MONGO_SERVER=3.4"
- "MONGO_SERVER=3.6"
- "MONGO_SERVER=4.0"
2019-11-24 09:29:15 +00:00
- "MONGO_SERVER=4.2"
2020-11-07 10:17:59 +00:00
- "MONGO_SERVER=4.4"
2019-11-21 14:20:35 +00:00
- "MONGO_SERVER=latest"
name: "[${{ matrix.version }}]"
steps:
# ------------------------------------------------------------
# Checkout repository
# ------------------------------------------------------------
- name: Checkout repository
uses: actions/checkout@v1
- name: Show environment
shell: bash
run: |
env
- name: Show network
shell: bash
run: |
netstat -an || true
ss -tlun || true
- name: Show Docker version
shell: bash
run: |
docker version
# ------------------------------------------------------------
# Setup
# ------------------------------------------------------------
- name: Configure
shell: bash
run: |
cd .tests/
2019-11-21 14:20:35 +00:00
# Set the matrix version
make configure KEY="${VERSION//=*/}" VAL="${VERSION//*=}"
# 3306 is taken, so chose another one
make configure KEY=HOST_PORT_MYSQL VAL=3307
env:
2019-11-21 14:20:35 +00:00
VERSION: ${{ matrix.version }}
- name: Pull images
shell: bash
run: |
cd .tests/
make pull
- name: Startup
shell: bash
run: |
cd .tests/
make start
- name: Docker logs
shell: bash
run: |
cd .tests/
make logs
# ------------------------------------------------------------
# Run tests
# ------------------------------------------------------------
- name: Test Modules
shell: bash
run: |
cd .tests/
make test-smoke-modules
if: success() || failure()
- name: Test Config
shell: bash
run: |
cd .tests/
make test-smoke-config
if: success() || failure()
- name: Test Intranet
shell: bash
run: |
cd .tests/
make test-smoke-intranet
if: success() || failure()
- name: Test Vendors
shell: bash
run: |
cd .tests/
make test-smoke-vendors
if: success() || failure()
- name: Test Vhosts
shell: bash
run: |
cd .tests/
make test-smoke-vhosts
if: success() || failure()
- name: Test Reverse Proxy
shell: bash
run: |
cd .tests/
make test-smoke-rproxies
if: success() || failure()
- name: Test SSL
shell: bash
run: |
cd .tests/
make test-smoke-ssl
if: success() || failure()
- name: Test Bind
shell: bash
run: |
cd .tests/
make test-smoke-bind
if: success() || failure()
- name: Test Autostart
shell: bash
run: |
cd .tests/
make test-smoke-autostart
if: success() || failure()
- name: "Test Framework: CakePHP"
shell: bash
run: |
cd .tests/
make test-smoke-framework-cakephp
if: success() || failure()
- name: "Test Framework: Drupal"
shell: bash
run: |
cd .tests/
make test-smoke-framework-drupal
if: success() || failure()
2019-11-22 22:10:01 +00:00
- name: "Test Framework: Wordpress"
shell: bash
run: |
cd .tests/
make test-smoke-framework-wordpress
if: success() || failure()
- name: "Test Container"
shell: bash
run: |
2022-01-27 16:30:00 +00:00
retry() {
for n in $(seq 5); do
echo "[${n}/5] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/t";
return 0;
fi;
sleep 5;
echo "[FAIL] ${n}/5";
done;
return 1;
}
cd .tests/
2022-01-27 16:30:00 +00:00
retry make test-smoke-container
if: success() || failure()
# ------------------------------------------------------------
# Finish
# ------------------------------------------------------------
- name: "Finish: Docker logs"
shell: bash
run: |
cd .tests/
make logs
if: success() || failure()