mirror of
https://github.com/cytopia/devilbox.git
synced 2025-01-03 11:24:14 +00:00
288 lines
7.6 KiB
YAML
288 lines
7.6 KiB
YAML
---
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
# Job Name
|
|
# -------------------------------------------------------------------------------------------------
|
|
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:
|
|
smoke_version:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
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"
|
|
- "MYSQL_SERVER=mariadb-10.5"
|
|
- "MYSQL_SERVER=mariadb-10.6"
|
|
- "MYSQL_SERVER=mariadb-10.7"
|
|
- "MYSQL_SERVER=mariadb-10.8"
|
|
- "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"
|
|
- "PGSQL_SERVER=10-alpine"
|
|
- "PGSQL_SERVER=11"
|
|
- "PGSQL_SERVER=11-alpine"
|
|
- "PGSQL_SERVER=12"
|
|
- "PGSQL_SERVER=12-alpine"
|
|
- "PGSQL_SERVER=13"
|
|
- "PGSQL_SERVER=13-alpine"
|
|
- "PGSQL_SERVER=14"
|
|
- "PGSQL_SERVER=14-alpine"
|
|
- "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"
|
|
- "REDIS_SERVER=6.0"
|
|
- "REDIS_SERVER=6.0-alpine"
|
|
- "REDIS_SERVER=6.2"
|
|
- "REDIS_SERVER=6.2-alpine"
|
|
- "REDIS_SERVER=latest"
|
|
- "REDIS_SERVER=alpine"
|
|
|
|
- "MEMCD_SERVER=1.4"
|
|
- "MEMCD_SERVER=1.4-alpine"
|
|
- "MEMCD_SERVER=1.5"
|
|
- "MEMCD_SERVER=1.5-alpine"
|
|
- "MEMCD_SERVER=1.6"
|
|
- "MEMCD_SERVER=1.6-alpine"
|
|
- "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"
|
|
- "MONGO_SERVER=4.2"
|
|
- "MONGO_SERVER=4.4"
|
|
- "MONGO_SERVER=5.0"
|
|
- "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/
|
|
# 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:
|
|
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()
|
|
|
|
- name: "Test Framework: Wordpress"
|
|
shell: bash
|
|
run: |
|
|
cd .tests/
|
|
make test-smoke-framework-wordpress
|
|
if: success() || failure()
|
|
|
|
- name: "Test Container"
|
|
shell: bash
|
|
run: |
|
|
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/
|
|
retry make test-smoke-container
|
|
if: success() || failure()
|
|
|
|
# ------------------------------------------------------------
|
|
# Finish
|
|
# ------------------------------------------------------------
|
|
|
|
- name: "Finish: Docker logs"
|
|
shell: bash
|
|
run: |
|
|
cd .tests/
|
|
make logs
|
|
if: success() || failure()
|