Skip to content

Commit 9648d18

Browse files
committed
Added MariaDB tests to nightly
1 parent 9a3a4b5 commit 9648d18

File tree

3 files changed

+67
-4
lines changed

3 files changed

+67
-4
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Test mysqli
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
set -x
8+
export MYSQL_TEST_USER=root
9+
export MYSQL_TEST_PASSWD=root
10+
sapi/cli/php run-tests.php -P -q \
11+
-g FAIL,BORK,LEAK,XLEAK \
12+
--no-progress --offline --show-diff --show-slow 1000 --set-timeout 120 \
13+
ext/mysqli

.github/actions/test-libmysqlclient/action.yml renamed to .github/actions/test-pdo-mysql/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test libmysqlclient
1+
name: Test pdo_mysql
22
inputs:
33
withMysqli:
44
required: true
@@ -14,7 +14,6 @@ runs:
1414
export PDO_MYSQL_TEST_HOST=127.0.0.1
1515
export PDO_MYSQL_TEST_USER=root
1616
export PDO_MYSQL_TEST_PASS=root
17-
export REPORT_EXIT_STATUS=no
1817
sapi/cli/php run-tests.php -P -q \
1918
-g FAIL,BORK,LEAK,XLEAK \
2019
--no-progress --offline --show-diff --show-slow 1000 --set-timeout 120 \

.github/workflows/nightly.yml

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ jobs:
742742
libmysql: mysql-8.0.35-linux-glibc2.28-x86_64.tar.xz
743743
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
744744
- name: Test mysql-8.0
745-
uses: ./.github/actions/test-libmysqlclient
745+
uses: ./.github/actions/test-pdo-mysql
746746
with:
747747
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
748748
- name: Build mysql-8.2
@@ -752,7 +752,7 @@ jobs:
752752
libmysql: mysql-8.2.0-linux-glibc2.28-x86_64.tar.xz
753753
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
754754
- name: Test mysql-8.2
755-
uses: ./.github/actions/test-libmysqlclient
755+
uses: ./.github/actions/test-pdo-mysql
756756
with:
757757
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
758758
- name: Verify generated files are up to date
@@ -762,6 +762,57 @@ jobs:
762762
uses: ./.github/actions/notify-slack
763763
with:
764764
token: ${{ secrets.ACTION_MONITORING_SLACK }}
765+
MariaDB:
766+
needs: GENERATE_MATRIX
767+
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' && matrix.branch.ref != 'PHP-8.1' }}
768+
services:
769+
maria_db:
770+
image: quay.io/mariadb-foundation/mariadb-devel:latest
771+
ports:
772+
- 3306:3306
773+
env:
774+
MYSQL_DATABASE: test
775+
MYSQL_ROOT_PASSWORD: root
776+
strategy:
777+
fail-fast: false
778+
matrix:
779+
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
780+
name: "${{ matrix.branch.name }}_MariaDB"
781+
runs-on: ubuntu-${{ matrix.branch.version.minor >= 3 && '22.04' || '20.04' }}
782+
env:
783+
IS_MARIADB_TEST: true
784+
steps:
785+
- name: git checkout
786+
uses: actions/checkout@v4
787+
with:
788+
ref: ${{ matrix.branch.ref }}
789+
- name: apt
790+
run: |
791+
sudo apt-get update -y | true
792+
sudo apt install bison re2c
793+
- name: Setup
794+
run: |
795+
./buildconf --force
796+
./configure --enable-werror \
797+
--enable-option-checking=fatal \
798+
--disable-all \
799+
--enable-pdo \
800+
--with-pdo-mysql \
801+
--with-mysqli
802+
make -j$(/usr/bin/nproc) >/dev/null
803+
- name: Test pdo_mysql
804+
uses: ./.github/actions/test-pdo-mysql
805+
with:
806+
withMysqli: false
807+
- name: Test mysqli
808+
uses: ./.github/actions/test-mysqli
809+
- name: Verify generated files are up to date
810+
uses: ./.github/actions/verify-generated-files
811+
- name: Notify Slack
812+
if: failure()
813+
uses: ./.github/actions/notify-slack
814+
with:
815+
token: ${{ secrets.ACTION_MONITORING_SLACK }}
765816
PECL:
766817
if: github.repository_owner == 'php' || github.event_name == 'workflow_dispatch'
767818
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)