2020-11-10 18:49:02 +01:00
|
|
|
name: PHPUnit
|
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
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-12-29 10:51:07 +01:00
|
|
|
php-versions: ['8.0', '8.1']
|
2020-11-03 17:24:06 +01:00
|
|
|
|
|
|
|
services:
|
|
|
|
oracle:
|
2022-10-18 23:02:52 +02:00
|
|
|
image: deepdiver/docker-oracle-xe-11g # 'wnameless/oracle-xe-11g-r2'
|
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
|
|
|
|
|
|
|
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 }}
|
2022-10-18 23:02:52 +02:00
|
|
|
extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, oci8, openssl, 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
|
|
|
|
|
|
|
|
- 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
|
|
|
|
|
|
|
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
|