Skip to content

Commit

Permalink
test: Test federation cross DBs
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Dec 10, 2024
1 parent 6db6597 commit 2883d13
Showing 1 changed file with 83 additions and 7 deletions.
90 changes: 83 additions & 7 deletions .github/workflows/integration-federation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,22 @@ jobs:

needs: changes
if: needs.changes.outputs.src != 'false'
name: Federation ${{ matrix.host-server-versions }} -> ${{ matrix.remote-server-versions }}
name: Federation ${{ matrix.host-server-versions }} (${{ matrix.host-db }}) -> ${{ matrix.remote-server-versions }} (${{ matrix.remote-db }})

strategy:
fail-fast: false
matrix:
include:
- test-suite: 'federation'
php-versions: '8.2'
host-db: 'oci'
host-server-versions: 'bugfix/noid/oracle-federation'
host-spreed-versions: ${{ github.event.pull_request.head.sha }}
host-guests-versions: 'master'
host-circles-versions: 'master'
host-call-summary-bot-versions: 'main'
host-notifications-versions: 'master'
remote-db: 'mysql'
remote-server-versions: 'stable30'
remote-spreed-versions: 'stable30'
remote-guests-versions: 'stable30'
Expand All @@ -67,12 +69,30 @@ jobs:
remote-notifications-versions: 'stable30'
- test-suite: 'federation'
php-versions: '8.2'
host-db: 'pgsql'
host-server-versions: 'bugfix/noid/oracle-federation'
host-spreed-versions: ${{ github.event.pull_request.head.sha }}
host-guests-versions: 'master'
host-circles-versions: 'master'
host-call-summary-bot-versions: 'main'
host-notifications-versions: 'master'
remote-db: 'mysql'
remote-server-versions: 'stable30'
remote-spreed-versions: 'stable30'
remote-guests-versions: 'stable30'
remote-circles-versions: 'stable30'
remote-call-summary-bot-versions: 'main'
remote-notifications-versions: 'stable30'
- test-suite: 'federation'
php-versions: '8.2'
host-db: 'oci'
host-server-versions: 'stable30'
host-spreed-versions: 'stable30'
host-guests-versions: 'stable30'
host-circles-versions: 'stable30'
host-call-summary-bot-versions: 'main'
host-notifications-versions: 'stable30'
remote-db: 'mysql'
remote-server-versions: 'bugfix/noid/oracle-federation'
remote-spreed-versions: ${{ github.event.pull_request.head.sha }}
remote-guests-versions: 'master'
Expand Down Expand Up @@ -109,6 +129,16 @@ jobs:
MYSQL_ROOT_PASSWORD: rootpassword
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10

postgres:
image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest
ports:
- 4445:5432/tcp
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: rootpassword
POSTGRES_DB: nextcloud
options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5

steps:
- name: Set app env
run: |
Expand Down Expand Up @@ -224,13 +254,63 @@ jobs:
working-directory: host/apps/${{ env.APP_NAME }}/tests/integration
run: composer i

- name: Set up Nextcloud - Host
- name: Set up Nextcloud - Host (Postgres)
if: ${{ matrix.host-db == 'pgsql' }}
env:
DB_PORT: 4445
working-directory: host/
run: |
mkdir data
./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
- name: Set up Nextcloud - Host (Oracle)
if: ${{ matrix.host-db == 'oci' }}
env:
DB_PORT: 1521
working-directory: host/
run: |
mkdir data
./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin
- name: Set up Nextcloud - Host (MySQL)
if: ${{ matrix.host-db == 'mysql' }}
env:
DB_PORT: 4444
working-directory: host/
run: |
mkdir data
./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
- name: Set up Nextcloud - Remote (Postgres)
if: ${{ matrix.remote-db == 'pgsql' }}
env:
DB_PORT: 4445
working-directory: remote/
run: |
mkdir data
./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
- name: Set up Nextcloud - Remote (Oracle)
if: ${{ matrix.remote-db == 'oracle' }}
env:
DB_PORT: 1521
working-directory: remote/
run: |
mkdir data
./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin
- name: Set up Nextcloud - Remote (MySQL)
if: ${{ matrix.remote-db == 'mysql' }}
env:
DB_PORT: 4444
working-directory: remote/
run: |
mkdir data
./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
- name: Set up Nextcloud - Host (Shared)
working-directory: host/
run: |
./occ config:system:set debug --value=true --type=boolean
./occ config:system:set hashing_default_password --value=true --type=boolean
./occ config:system:set memcache.local --value="\\OC\\Memcache\\APCu"
Expand All @@ -241,13 +321,9 @@ jobs:
./occ app:enable --force guests
./occ app:enable --force notifications
- name: Set up Nextcloud - Remote
env:
DB_PORT: 4444
- name: Set up Nextcloud - Remote (Shared)
working-directory: remote/
run: |
mkdir data
./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
./occ config:system:set debug --value=true --type=boolean
./occ config:system:set hashing_default_password --value=true --type=boolean
./occ config:system:set memcache.local --value="\\OC\\Memcache\\APCu"
Expand Down

0 comments on commit 2883d13

Please sign in to comment.