From 898868871a7ff422a2302837cc7a1bcf111ee1bf Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 2 Dec 2022 14:11:55 +1100 Subject: [PATCH] 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. --- .github/actions/test-mysql-extra/action.yml | 30 +++++++++++++++++++++ .github/workflows/nightly.yml | 14 ++++++++++ .github/workflows/push.yml | 12 +++++++++ 3 files changed, 56 insertions(+) create mode 100644 .github/actions/test-mysql-extra/action.yml diff --git a/.github/actions/test-mysql-extra/action.yml b/.github/actions/test-mysql-extra/action.yml new file mode 100644 index 0000000000000..5992f0719b937 --- /dev/null +++ b/.github/actions/test-mysql-extra/action.yml @@ -0,0 +1,30 @@ +name: Test Extra MySQL/MariaDB +inputs: + runHost: + required: true + runPort: + required: true + runTestsParameters: + default: '' + required: false +runs: + using: composite + steps: + - shell: bash + run: | + set -x + export MYSQL_TEST_HOST=${{ inputs.runHost }} + export MYSQL_TEST_USER=root + export MYSQL_TEST_PASSWD=root + export MYSQL_TEST_PORT=${{ inputs.runPort }} + export PDO_MYSQL_TEST_DSN="mysql:host=${{ inputs.runHost }};dbname=test;port=${{ inputs.runPort }}" + export PDO_MYSQL_TEST_USER=root + export PDO_MYSQL_TEST_PASS=root + sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \ + -j$(/usr/bin/nproc) \ + -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \ + --offline \ + --show-diff \ + --show-slow 1000 \ + --set-timeout 120 \ + ext/mysqli ext/pdo_mysql diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 49f35dd9d38a9..a35f07465a24b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -165,6 +165,13 @@ jobs: env: MYSQL_DATABASE: test MYSQL_ROOT_PASSWORD: root + mariadbverylatest: + image: quay.io/mariadb-foundation/mariadb-devel:verylatest + ports: + - 3307:3306 + env: + MARIADB_DATABASE: test + MARIADB_ROOT_PASSWORD: root steps: - name: git checkout uses: actions/checkout@v4 @@ -195,6 +202,13 @@ jobs: with: runTestsParameters: >- ${{ matrix.run_tests_parameters }} + - name: Test Extra MariaDB (very latest) + uses: ./.github/actions/test-mysql-extra + with: + runHost: mariadbverylatest + runPort: ${{ job.services.mariadbverylatest.ports[3306] }} + runTestsParameters: >- + ${{ matrix.run_tests_parameters }} - name: Test Tracing JIT uses: ./.github/actions/test-linux with: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 923e5496ed82f..e444ecad80c38 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -81,6 +81,13 @@ jobs: asan: true name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}" runs-on: ubuntu-22.04 + mariadblatest: + image: quay.io/mariadb-foundation/mariadb-devel:latest + ports: + - 3307:3306 + env: + MARIADB_DATABASE: test + MARIADB_ROOT_PASSWORD: root steps: - name: git checkout uses: actions/checkout@v4 @@ -133,6 +140,11 @@ jobs: uses: ./.github/actions/test-linux with: testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} + - name: Test Extra MariaDB (latest) + uses: ./.github/actions/test-mysql-extra + with: + runHost: mariadblatest + runPort: ${{ job.services.mariadblatest.ports[3306] }} - name: Test Tracing JIT uses: ./.github/actions/test-linux with: