Skip to content

Commit a8c5eb9

Browse files
committed
gh actions: add mariadb to CI
Run the mysqli and pdo_mysqli tests on MariaDB. The :latest tag is the latest stable version of MariaDB and used in the push workflow. The :verylatest tag is the last in development version of MariaDB tested in the nightly flow. The container quay.io/mariadb-foundation/mariadb-devel are the completed works on development on the major branches. We are testing both to ensure that neither PHP or MariaDB are breaking the protocol contract, and if we do, either MariaDB or PHP can fix this before this change ends up in a release.
1 parent 2f6b9e6 commit a8c5eb9

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Test Extra MySQL/MariaDB
2+
inputs:
3+
runHost:
4+
required: true
5+
runPort:
6+
required: true
7+
runTestsParameters:
8+
default: ''
9+
required: false
10+
runs:
11+
using: composite
12+
steps:
13+
- shell: bash
14+
run: |
15+
set -x
16+
export MYSQL_TEST_HOST=${{ inputs.runHost }}
17+
export MYSQL_TEST_USER=root
18+
export MYSQL_TEST_PASSWD=root
19+
export MYSQL_TEST_PORT=${{ inputs.runPort }}
20+
export PDO_MYSQL_TEST_DSN="mysql:host=${{ inputs.runHost }};dbname=test;port=${{ inputs.runPort }}"
21+
export PDO_MYSQL_TEST_USER=root
22+
export PDO_MYSQL_TEST_PASS=root
23+
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
24+
-j$(/usr/bin/nproc) \
25+
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
26+
--offline \
27+
--show-diff \
28+
--show-slow 1000 \
29+
--set-timeout 120 \
30+
ext/mysqli ext/pdo_mysql

.github/workflows/nightly.yml

+14
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ jobs:
129129
env:
130130
MYSQL_DATABASE: test
131131
MYSQL_ROOT_PASSWORD: root
132+
mariadbverylatest:
133+
image: quay.io/mariadb-foundation/mariadb-devel:verylatest
134+
ports:
135+
- 3307:3306
136+
env:
137+
MARIADB_DATABASE: test
138+
MARIADB_ROOT_PASSWORD: root
132139
steps:
133140
- name: git checkout
134141
uses: actions/checkout@v3
@@ -151,6 +158,13 @@ jobs:
151158
with:
152159
runTestsParameters: >-
153160
${{ matrix.run_tests_parameters }}
161+
- name: Test Extra MariaDB (very latest)
162+
uses: ./.github/actions/test-mysql-extra
163+
with:
164+
runHost: mariadbverylatest
165+
runPort: ${{ job.services.mariadbverylatest.ports[3306] }}
166+
runTestsParameters: >-
167+
${{ matrix.run_tests_parameters }}
154168
- name: Test Tracing JIT
155169
uses: ./.github/actions/test-linux
156170
with:

.github/workflows/push.yml

+12
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ jobs:
7878
env:
7979
MYSQL_DATABASE: test
8080
MYSQL_ROOT_PASSWORD: root
81+
mariadblatest:
82+
image: quay.io/mariadb-foundation/mariadb-devel:latest
83+
ports:
84+
- 3307:3306
85+
env:
86+
MARIADB_DATABASE: test
87+
MARIADB_ROOT_PASSWORD: root
8188
steps:
8289
- name: git checkout
8390
uses: actions/checkout@v3
@@ -95,6 +102,11 @@ jobs:
95102
uses: ./.github/actions/install-linux-x32
96103
- name: Test
97104
uses: ./.github/actions/test-linux
105+
- name: Test Extra MariaDB (latest)
106+
uses: ./.github/actions/test-mysql-extra
107+
with:
108+
runHost: mariadblatest
109+
runPort: ${{ job.services.mariadblatest.ports[3306] }}
98110
- name: Test Tracing JIT
99111
uses: ./.github/actions/test-linux
100112
with:

0 commit comments

Comments
 (0)