ci(oracle): Test against Oracle 11, 18, 21 and 23

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/46605/head
Joas Schilling 4 months ago
parent 64ca4b832d
commit 5c02303ce4
No known key found for this signature in database
GPG Key ID: 74434EFE0D2E2205
  1. 29
      .github/workflows/phpunit-oci.yml

@ -51,15 +51,20 @@ jobs:
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.src != 'false' && ${{ github.repository_owner != 'nextcloud-gmbh' }}
if: ${{ needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh' }}
strategy:
matrix:
oracle-versions: ['11']
php-versions: ['8.1', '8.2', '8.3']
include:
- php-versions: '8.3'
- oracle-versions: '11'
php-versions: '8.1'
- oracle-versions: '18'
php-versions: '8.1'
coverage: ${{ github.event_name != 'pull_request' }}
- oracle-versions: '21'
php-versions: '8.2'
- oracle-versions: '23'
php-versions: '8.3'
name: Oracle ${{ matrix.oracle-versions }} (PHP ${{ matrix.php-versions }}) - database tests
@ -71,23 +76,21 @@ jobs:
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
oracle:
image: ghcr.io/gvenzl/oracle-xe:${{ matrix.oracle-versions }}
image: ghcr.io/gvenzl/oracle-${{ matrix.oracle-versions < 23 && 'xe' || 'free' }}:${{ matrix.oracle-versions }}
# Provide passwords and other environment variables to container
env:
ORACLE_RANDOM_PASSWORD: true
APP_USER: oc_autotest
APP_USER_PASSWORD: nextcloud
ORACLE_PASSWORD: oracle
# Forward Oracle port
ports:
- 4444:1521/tcp
- 1521:1521
# Provide healthcheck script options for startup
options: >-
--health-cmd healthcheck.sh
--health-interval 10s
--health-timeout 5s
--health-interval 20s
--health-timeout 10s
--health-retries 10
steps:
@ -111,13 +114,11 @@ jobs:
run: composer i
- name: Set up Nextcloud
env:
DB_PORT: 4444
run: |
mkdir data
cp tests/redis.config.php config/
cp tests/preseed-config.php config/config.php
./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=oc_autotest --database-pass=nextcloud --admin-user admin --admin-pass admin
./occ maintenance:install --verbose --database=oci --database-name=${{ matrix.oracle-versions < 23 && 'XE' || 'FREE' }} --database-host=127.0.0.1 --database-port=1521 --database-user=system --database-pass=oracle --admin-user admin --admin-pass admin
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
- name: PHPUnit

Loading…
Cancel
Save