@@ -23,6 +23,7 @@ permissions:
2323
2424jobs :
2525 flow_test :
26+ name : flow_test (${{ matrix.runner }}, ${{ matrix.db-version.pg }}, ${{ matrix.db-version.mysql }}, ${{ matrix.db-version.mongo }}, ${{ matrix.db-version.ch }})
2627 if : |
2728 (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
2829 (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository) ||
3536 db-version : [
3637 {pg: 16, mysql: 'mysql-gtid', mongo: '6.0', ch: 'lts'},
3738 {pg: 17, mysql: 'mysql-pos', mongo: '7.0', ch: 'stable'},
38- {pg: 18, mysql: 'maria', mongo: '8.0', ch: 'latest'},
39+ {pg: 18, mysql: 'maria-pos', mongo: '8.0', ch: 'latest'},
40+ {pg: 18, mysql: 'maria-gtid', mongo: '8.0', ch: 'stable'},
3941 ]
42+ # Per-version container settings consumed by the "MySQL" step, keyed by the matrix
43+ # db-version.mysql value. Grouped under "mysql" since these are MySQL/MariaDB families;
44+ # only the databases handled by the MySQL step are listed here. Wrapped in a single-item
45+ # list because matrix values must be arrays; it stays a single shared value (no extra jobs).
46+ version-configs :
47+ - mysql :
48+ mysql-gtid :
49+ img : ' mysql:9.5'
50+ env : ['MYSQL_ROOT_PASSWORD=cipass']
51+ parameters : []
52+ mysql-pos :
53+ img : ' mysql:5.7'
54+ env : ['MYSQL_ROOT_PASSWORD=cipass']
55+ parameters : ['--log_bin=mysql-bin', '--server-id=1', '--bind-address=::']
56+ maria-pos :
57+ img : ' mariadb:lts-ubi9@sha256:55a81b2d791d2ff8ad33fef413d9e45e0ac57a951127e0cfc69a8e59f922ba6e'
58+ env : ['MARIADB_ROOT_PASSWORD=cipass']
59+ parameters : ['--log-bin=maria']
60+ maria-gtid :
61+ img : ' mariadb:lts-ubi9@sha256:55a81b2d791d2ff8ad33fef413d9e45e0ac57a951127e0cfc69a8e59f922ba6e'
62+ env : ['MARIADB_ROOT_PASSWORD=cipass']
63+ parameters : ['--log-bin=maria', '--gtid-strict-mode=ON']
4064 runs-on : ${{ matrix.runner }}
4165 timeout-minutes : 30
4266 services :
@@ -190,14 +214,13 @@ jobs:
190214 output-credentials : true
191215
192216 - name : MySQL
217+ env :
218+ DB_IMG : ${{ matrix.version-configs.mysql[matrix.db-version.mysql].img }}
219+ DB_ENV : ${{ join(matrix.version-configs.mysql[matrix.db-version.mysql].env, ' -e ') }}
220+ DB_PARAMS : ${{ join(matrix.version-configs.mysql[matrix.db-version.mysql].parameters, ' ') }}
193221 run : |
194- if [ "${{ matrix.db-version.mysql }}" = "mysql-gtid" ]; then
195- docker run -d --rm --name mysql --network ${{ job.container.network }} -p 3306:3306 -e MYSQL_ROOT_PASSWORD=cipass mysql:9.5
196- elif [ "${{ matrix.db-version.mysql }}" = "mysql-pos" ]; then
197- docker run -d --rm --name mysql --network ${{ job.container.network }} -p 3306:3306 -e MYSQL_ROOT_PASSWORD=cipass mysql:5.7 --log_bin=mysql-bin --server-id=1 --bind-address=::
198- elif [ "${{ matrix.db-version.mysql }}" = "maria" ]; then
199- docker run -d --rm --name mariadb --network ${{ job.container.network }} -p 3306:3306 -e MARIADB_ROOT_PASSWORD=cipass mariadb:lts-ubi9@sha256:55a81b2d791d2ff8ad33fef413d9e45e0ac57a951127e0cfc69a8e59f922ba6e --log-bin=maria
200- fi
222+ docker run -d --rm --name mysql --network ${{ job.container.network }} -p 3306:3306 \
223+ -e $DB_ENV $DB_IMG $DB_PARAMS
201224
202225 - name : Mongo
203226 run : |
0 commit comments