Skip to content

Commit a684a25

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 a541b95 commit a684a25

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed
Lines changed: 30 additions & 0 deletions
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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,13 @@ jobs:
165165
env:
166166
MYSQL_DATABASE: test
167167
MYSQL_ROOT_PASSWORD: root
168+
mariadbverylatest:
169+
image: quay.io/mariadb-foundation/mariadb-devel:verylatest
170+
ports:
171+
- 3307:3306
172+
env:
173+
MARIADB_DATABASE: test
174+
MARIADB_ROOT_PASSWORD: root
168175
steps:
169176
- name: git checkout
170177
uses: actions/checkout@v4
@@ -195,6 +202,13 @@ jobs:
195202
with:
196203
runTestsParameters: >-
197204
${{ matrix.run_tests_parameters }}
205+
- name: Test Extra MariaDB (very latest)
206+
uses: ./.github/actions/test-mysql-extra
207+
with:
208+
runHost: mariadbverylatest
209+
runPort: ${{ job.services.mariadbverylatest.ports[3306] }}
210+
runTestsParameters: >-
211+
${{ matrix.run_tests_parameters }}
198212
- name: Test Tracing JIT
199213
uses: ./.github/actions/test-linux
200214
with:

.github/workflows/push.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
env:
5353
MYSQL_DATABASE: test
5454
MYSQL_ROOT_PASSWORD: root
55+
<<<<<<< HEAD
5556
postgres:
5657
image: postgres
5758
ports:
@@ -81,6 +82,13 @@ jobs:
8182
asan: true
8283
name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}"
8384
runs-on: ubuntu-22.04
85+
mariadblatest:
86+
image: quay.io/mariadb-foundation/mariadb-devel:latest
87+
ports:
88+
- 3307:3306
89+
env:
90+
MARIADB_DATABASE: test
91+
MARIADB_ROOT_PASSWORD: root
8492
steps:
8593
- name: git checkout
8694
uses: actions/checkout@v4
@@ -131,8 +139,16 @@ jobs:
131139
- name: Test
132140
if: matrix.asan == false
133141
uses: ./.github/actions/test-linux
142+
<<<<<<< HEAD
134143
with:
135144
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
145+
=======
146+
- name: Test Extra MariaDB (latest)
147+
uses: ./.github/actions/test-mysql-extra
148+
with:
149+
runHost: mariadblatest
150+
runPort: ${{ job.services.mariadblatest.ports[3306] }}
151+
>>>>>>> a8c5eb9b71 (gh actions: add mariadb to CI)
136152
- name: Test Tracing JIT
137153
uses: ./.github/actions/test-linux
138154
with:

0 commit comments

Comments
 (0)