[PECL-CVS] [pecl-database-pdo_oci] CI-update: Refactor CI workflow for PHP and Oracle versions

[email protected] (Sharad Chandran R via GitHub)
Newsgroups php.pecl.cvs
Message-ID <[email protected]>
Author: Sharad Chandran R (sharadraju)
Committer: GitHub (web-flow)
Pusher: sharadraju
Date: 2025-12-29T22:14:35+05:30

Commit: https://github.com/php/pecl-database-pdo_oci/commit/ba901fcde4434abebea2a15c03c5af99704b4d7b
Raw diff: https://github.com/php/pecl-database-pdo_oci/commit/ba901fcde4434abebea2a15c03c5af99704b4d7b.diff

Refactor CI workflow for PHP and Oracle versions

Updated CI workflow to include multiple Oracle versions and PHP versions in the matrix. Changed checkout action version and consolidated Oracle service definitions.

Changed paths:
  M  .github/workflows/ci.yml


Diff:

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index dd539d0..a6b8f6d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,53 +12,44 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
+        version: [8.2, 8.3, 8.4, 8.5, 8.6]
+        oracle: [11, 18, 21, 23]
         include:
+          - oracle: 11
+            image: wnameless/oracle-xe-11g-r2
+            port: 1511
+            options: --name=oci
+          - oracle: 18
+            image: gvenzl/oracle-xe:18-slim-faststart
+            port: 1518
+            options: --health-cmd healthcheck.sh --health-interval 10s --health-timeout 5s --health-retries 10
+          - oracle: 21
+            image: gvenzl/oracle-xe:21-slim-faststart
+            port: 1521
+            options: --health-cmd healthcheck.sh --health-interval 10s --health-timeout 5s --health-retries 10
+          - oracle: 23
+            image: gvenzl/oracle-free:23-slim
+            port: 1523
+            options: --health-cmd healthcheck.sh --health-interval 10s --health-timeout 5s --health-retries 10
+          - version: 8.2
+            branch : PHP-8.2
           - version: 8.3
             branch: PHP-8.3
           - version: 8.4
-            branch: PHP-8.4
+            branch : PHP-8.4
           - version: 8.5
+            branch : PHP-8.5
+          - version: 8.6
             branch: master
     services:
-      oracle-11:
-        image: wnameless/oracle-xe-11g-r2
+      oracle:
+        image: ${{ matrix.image }}
         ports:
-          - 1511:1521
+          - ${{ matrix.port }}:1521
         env:
           ORACLE_ALLOW_REMOTE: true
-      oracle-18:
-        image: gvenzl/oracle-xe:18-slim-faststart
-        ports:
-          - 1518:1521
-        env:
-          ORACLE_PASSWORD: my_pass_18
-        options: >-
-          --health-cmd healthcheck.sh
-          --health-interval 10s
-          --health-timeout 5s
-          --health-retries 10
-      oracle-21:
-        image: gvenzl/oracle-xe:21-slim-faststart
-        ports:
-          - 1521:1521
-        env:
-          ORACLE_PASSWORD: my_pass_21
-        options: >-
-          --health-cmd healthcheck.sh
-          --health-interval 10s
-          --health-timeout 5s
-          --health-retries 10
-      oracle-23:
-        image: gvenzl/oracle-free:23-slim
-        ports:
-          - 1523:1521
-        env:
-          ORACLE_PASSWORD: my_pass_23
-        options: >-
-          --health-cmd healthcheck.sh
-          --health-interval 10s
-          --health-timeout 5s
-          --health-retries 10
+          ORACLE_PASSWORD: oracle
+        options: ${{ matrix.options }}
     runs-on: ubuntu-latest
     steps:
       - name: Setup dependencies
@@ -75,9 +66,9 @@ jobs:
           # fix debug build warning: zend_signal: handler was replaced for signal (2) after startup
           echo DISABLE_INTERRUPT=on > /opt/oracle/instantclient/network/admin/sqlnet.ora
       - name: Checkout
-        uses: actions/checkout@v4
+        uses: actions/checkout@v6
       - name: Checkout php-src
-        uses: actions/checkout@v4
+        uses: actions/checkout@v6
         with:
           repository: php/php-src
           ref: ${{ matrix.branch }}
@@ -95,7 +86,7 @@ jobs:
           echo 'extension=pdo_oci.so' | sudo tee /etc/php/${{ matrix.version }}/mods-available/pdo_oci.ini
           sudo phpenmod -v ${{ matrix.version }} pdo_oci
           php --ri pdo_oci
-      - name: Run tests /w Oracle 11 (for PHP 8.3 only)
+      - name: Run tests /w Oracle ${{ matrix.oracle }}
         # https://github.com/php/php-src/pull/18734
         # https://github.com/php/pecl-database-pdo_oci/pull/16#discussion_r2119810891
         if: matrix.version == '8.3'
@@ -105,34 +96,7 @@ jobs:
           PDO_OCI_TEST_DIR: ${{ github.workspace }}/tests
           PDO_OCI_TEST_USER: system
           PDO_OCI_TEST_PASS: oracle
-          PDO_OCI_TEST_DSN: oci:dbname=0.0.0.0:1511/XE;charset=AL32UTF8
-      - name: Run tests /w Oracle 18
-        if: success() || failure()
-        run: php php-src/run-tests.php --show-diff --show-slow 1000 --set-timeout 120 tests
-        env:
-          PDO_TEST_DIR: ${{ github.workspace }}/php-src/ext/pdo/tests
-          PDO_OCI_TEST_DIR: ${{ github.workspace }}/tests
-          PDO_OCI_TEST_USER: system
-          PDO_OCI_TEST_PASS: my_pass_18
-          PDO_OCI_TEST_DSN: oci:dbname=0.0.0.0:1518/XE;charset=AL32UTF8
-      - name: Run tests /w Oracle 21
-        if: success() || failure()
-        run: php php-src/run-tests.php --show-diff --show-slow 1000 --set-timeout 120 tests
-        env:
-          PDO_TEST_DIR: ${{ github.workspace }}/php-src/ext/pdo/tests
-          PDO_OCI_TEST_DIR: ${{ github.workspace }}/tests
-          PDO_OCI_TEST_USER: system
-          PDO_OCI_TEST_PASS: my_pass_21
-          PDO_OCI_TEST_DSN: oci:dbname=0.0.0.0:1521/XE;charset=AL32UTF8
-      - name: Run tests /w Oracle 23
-        if: success() || failure()
-        run: php php-src/run-tests.php --show-diff --show-slow 1000 --set-timeout 120 tests
-        env:
-          PDO_TEST_DIR: ${{ github.workspace }}/php-src/ext/pdo/tests
-          PDO_OCI_TEST_DIR: ${{ github.workspace }}/tests
-          PDO_OCI_TEST_USER: system
-          PDO_OCI_TEST_PASS: my_pass_23
-          PDO_OCI_TEST_DSN: oci:dbname=0.0.0.0:1523/FREEPDB1;charset=AL32UTF8
+          PDO_OCI_TEST_DSN: oci:dbname=0.0.0.0:${{ matrix.port }}/${{ matrix.oracle == 23 && 'FREEPDB1' || 'XE' }};charset=AL32UTF8
 
   windows-matrix:
     runs-on: ubuntu-latest
@@ -140,12 +104,12 @@ jobs:
       matrix: ${{ steps.extension-matrix.outputs.matrix }}
     steps:
       - name: Checkout
-        uses: actions/checkout@v4
+        uses: actions/checkout@v6
       - name: Create matrix
         id: extension-matrix
         uses: php/php-windows-builder/extension-matrix@v1
         with:
-          php-version-list: '8.3, 8.4, master'
+          php-version-list: '8.3, 8.4, 8.5, master'
 
   windows:
     needs: windows-matrix
@@ -155,7 +119,7 @@ jobs:
       matrix: ${{fromJson(needs.windows-matrix.outputs.matrix)}}
     steps:
       - name: Checkout
-        uses: actions/checkout@v4
+        uses: actions/checkout@v6
       - name: Build
         uses: php/php-windows-builder/extension@v1
         with:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.