Skip to content

Commit 8988688

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 8988688

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ jobs:
8181
asan: true
8282
name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}"
8383
runs-on: ubuntu-22.04
84+
mariadblatest:
85+
image: quay.io/mariadb-foundation/mariadb-devel:latest
86+
ports:
87+
- 3307:3306
88+
env:
89+
MARIADB_DATABASE: test
90+
MARIADB_ROOT_PASSWORD: root
8491
steps:
8592
- name: git checkout
8693
uses: actions/checkout@v4
@@ -133,6 +140,11 @@ jobs:
133140
uses: ./.github/actions/test-linux
134141
with:
135142
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
143+
- name: Test Extra MariaDB (latest)
144+
uses: ./.github/actions/test-mysql-extra
145+
with:
146+
runHost: mariadblatest
147+
runPort: ${{ job.services.mariadblatest.ports[3306] }}
136148
- name: Test Tracing JIT
137149
uses: ./.github/actions/test-linux
138150
with:

0 commit comments

Comments
 (0)