2023-03-21 09:56:38 +01:00
|
|
|
name: PHPUnit oci
|
2020-11-03 17:24:06 +01:00
|
|
|
|
2022-10-18 23:02:52 +02:00
|
|
|
on: pull_request
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: phpunit-oci-${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
2020-11-03 17:24:06 +01:00
|
|
|
|
|
|
|
jobs:
|
2022-10-18 23:02:52 +02:00
|
|
|
phpunit-oci:
|
2022-12-03 23:01:05 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2020-11-03 17:24:06 +01:00
|
|
|
|
2023-03-15 08:08:18 +01:00
|
|
|
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
|
|
|
|
|
2020-11-03 17:24:06 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-01-26 10:03:33 +01:00
|
|
|
php-versions: ['8.0', '8.1', '8.2']
|
2020-11-03 17:24:06 +01:00
|
|
|
|
|
|
|
services:
|
|
|
|
oracle:
|
2023-06-02 00:44:42 +02:00
|
|
|
image: ghcr.io/gvenzl/oracle-xe:11
|
|
|
|
|
|
|
|
# Provide passwords and other environment variables to container
|
|
|
|
env:
|
|
|
|
ORACLE_RANDOM_PASSWORD: true
|
|
|
|
APP_USER: autotest
|
|
|
|
APP_USER_PASSWORD: owncloud
|
|
|
|
|
|
|
|
# Forward Oracle port
|
2020-11-03 17:24:06 +01:00
|
|
|
ports:
|
2022-10-18 23:02:52 +02:00
|
|
|
- 1521:1521/tcp
|
2020-11-03 17:24:06 +01:00
|
|
|
|
2023-06-02 00:44:42 +02:00
|
|
|
# Provide healthcheck script options for startup
|
|
|
|
options: >-
|
|
|
|
--health-cmd healthcheck.sh
|
|
|
|
--health-interval 10s
|
|
|
|
--health-timeout 5s
|
|
|
|
--health-retries 10
|
|
|
|
|
2020-11-03 17:24:06 +01:00
|
|
|
steps:
|
2020-11-10 18:49:02 +01:00
|
|
|
- name: Checkout server
|
2022-10-18 23:02:52 +02:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
2020-11-03 17:24:06 +01:00
|
|
|
|
2020-11-10 18:49:02 +01:00
|
|
|
- name: Set up php ${{ matrix.php-versions }}
|
|
|
|
uses: shivammathur/setup-php@v2
|
2020-11-03 17:24:06 +01:00
|
|
|
with:
|
2020-11-10 18:49:02 +01:00
|
|
|
php-version: ${{ matrix.php-versions }}
|
2023-06-02 00:44:42 +02:00
|
|
|
extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, oci8, openssl, pcntl, pdo_sqlite, posix, sqlite, xml, zip
|
2020-12-23 14:14:00 +01:00
|
|
|
tools: phpunit:9
|
2020-11-03 17:24:06 +01:00
|
|
|
coverage: none
|
2023-01-26 11:00:46 +01:00
|
|
|
ini-file: development
|
2023-01-03 13:33:49 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-11-03 17:24:06 +01:00
|
|
|
|
|
|
|
- name: Set up Nextcloud
|
|
|
|
run: |
|
|
|
|
mkdir data
|
|
|
|
./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=1521 --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin
|
|
|
|
php -f index.php
|
|
|
|
|
2020-11-10 18:49:02 +01:00
|
|
|
- name: PHPUnit
|
|
|
|
working-directory: tests
|
|
|
|
run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB
|
2022-10-18 23:02:52 +02:00
|
|
|
|
2023-02-23 16:58:15 +01:00
|
|
|
- name: Run repair steps
|
|
|
|
run: |
|
|
|
|
./occ maintenance:repair --include-expensive
|
|
|
|
|
2022-10-18 23:02:52 +02:00
|
|
|
summary:
|
|
|
|
permissions:
|
|
|
|
contents: none
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: phpunit-oci
|
|
|
|
|
|
|
|
if: always()
|
|
|
|
|
|
|
|
name: phpunit-oci-summary
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Summary status
|
|
|
|
run: if ${{ needs.phpunit-oci.result != 'success' }}; then exit 1; fi
|