-
Notifications
You must be signed in to change notification settings - Fork 456
37 lines (33 loc) · 1.73 KB
/
run-tests.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
name: Internal test suite
permissions:
contents: read
on:
pull_request:
push:
jobs:
test-apache-container:
name: Test (${{ matrix.configuration }}) on database ${{ matrix.database-image }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
database-image: ["mariadb:10.6", "mariadb:10.11", "mariadb:latest", "mysql:5.7", "mysql:latest"]
configuration: ["default", "one-host", "one-socket-host", "config-mount-dir", "fs-import-export", "different-apache-port", "run-as-www-data"]
steps:
- uses: actions/checkout@v4
- name: Switch to MySQL compatible ENVs
if: ${{ contains(matrix.database-image, 'mysql') }}
working-directory: ./testing/docker-compose/
run: sed -i 's/MARIADB_ROOT_PASSWORD/MYSQL_ROOT_PASSWORD/' ./docker-compose.testing-${{ matrix.configuration }}.yml
- name: Switch to MySQL compatible healthcheck
if: ${{ contains(matrix.database-image, 'mysql') }}
working-directory: ./testing/docker-compose/
run: sed -i 's/mariadb-admin/mysqladmin/' ./docker-compose.testing-${{ matrix.configuration }}.yml
- name: Build images
working-directory: ./testing/
run: docker compose -f ./docker-compose/docker-compose.testing-${{ matrix.configuration }}.yml build
- name: Run ${{ matrix.configuration }} tests
working-directory: ./testing/
run: docker compose -f ./docker-compose/docker-compose.testing-${{ matrix.configuration }}.yml up --build --abort-on-container-exit --exit-code-from=sut
env:
DB: ${{ matrix.database-image }}