cloud_bbb/.github/workflows/php-test.yml

55 lines
2.0 KiB
YAML
Raw Normal View History

2021-02-13 16:47:20 +01:00
name: PHP Tests
on:
pull_request:
push:
branches:
- master
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.3', '7.4']
nextcloud-versions: ['stable20', 'stable21', 'stable22']
2021-02-13 16:47:20 +01:00
include:
- php-versions: '7.2'
nextcloud-versions: 'stable20'
2021-07-26 16:03:41 +02:00
- php-versions: '8'
2021-07-26 17:03:59 +02:00
nextcloud-versions: 'stable22'
2021-02-13 16:47:20 +01:00
name: php${{ matrix.php-versions }} on ${{ matrix.nextcloud-versions }} unit tests
env:
CI: true
XDEBUG_MODE: coverage
steps:
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype, curl, dom, gd, gmp, iconv, intl, json, mbstring, openssl, pdo_sqlite, posix, sqlite, xml, zip
coverage: xdebug
- name: Checkout Nextcloud
run: git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.nextcloud-versions }} nextcloud
- name: Install Nextcloud
run: php -f nextcloud/occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database sqlite --database-pass=''
- name: Checkout the app
uses: actions/checkout@master
with:
path: nextcloud/apps/bbb
- name: Fix php-parser on stable20 incompatibility with phpunit 9.3+
if: ${{ matrix.nextcloud-versions == 'stable20' }}
working-directory: nextcloud/3rdparty
run: composer require nikic/php-parser:4.10
- name: Downgrade phpunit for php7.2
if: ${{ matrix.php-versions == '7.2' }}
working-directory: nextcloud/apps/bbb
2021-07-26 17:14:44 +02:00
run: composer update phpunit/phpunit christophwurst/nextcloud -W
2021-02-13 16:47:20 +01:00
- name: Install dependencies
working-directory: nextcloud/apps/bbb
run: composer install
2021-02-13 16:53:04 +01:00
- name: Enable app
run: php -f nextcloud/occ app:enable bbb
2021-02-13 16:47:20 +01:00
- name: Run tests
working-directory: nextcloud/apps/bbb
run: composer run test