diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f07da181..98aa2a81 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -13,20 +13,22 @@ jobs: tests: runs-on: ubuntu-latest - services: - oracle: - image: deepdiver/docker-oracle-xe-11g:2.0 - ports: - - 49160:22 - - 1521:1521 - strategy: fail-fast: true matrix: php: [8.2, 8.3, 8.4, 8.5] stability: [prefer-stable] + oracle: [11g, 21c] - name: PHP ${{ matrix.php }} - STABILITY ${{ matrix.stability }} + name: PHP ${{ matrix.php }} - ORACLE ${{ matrix.oracle }} - STABILITY ${{ matrix.stability }} + + services: + oracle: + image: ${{ matrix.oracle == '11g' && 'deepdiver/docker-oracle-xe-11g:2.0' || 'container-registry.oracle.com/database/express:21.3.0-xe' }} + ports: + - 1521:1521 + env: + ORACLE_PWD: ${{ matrix.oracle == '21c' && 'oracle' || '' }} steps: - name: Checkout code @@ -48,4 +50,9 @@ jobs: command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress - name: Execute tests - run: vendor/bin/phpunit + run: | + if [ "${{ matrix.oracle }}" = "21c" ]; then + SERVER_VERSION=12c vendor/bin/phpunit + else + vendor/bin/phpunit + fi diff --git a/tests/TestCase.php b/tests/TestCase.php index 3f845670..935fb573 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -84,6 +84,7 @@ protected function getEnvironmentSetUp($app): void 'username' => 'system', 'password' => 'oracle', 'port' => 1521, + 'server_version' => getenv('SERVER_VERSION') ? getenv('SERVER_VERSION') : '11g', ]); }