Update npm and node engines versions #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PHP Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: ['7.3', '7.4', '8.0'] | |
nextcloud-versions: ['stable22', 'stable23'] | |
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/ojsxc | |
- name: Remove OCP | |
working-directory: nextcloud/apps/ojsxc | |
run: composer remove --no-update --dev christophwurst/nextcloud | |
- name: Downgrade packages for php7.3 | |
if: ${{ matrix.php-versions == '7.3' }} | |
working-directory: nextcloud/apps/ojsxc | |
run: composer update -W | |
- name: Install dependencies | |
working-directory: nextcloud/apps/ojsxc | |
run: composer install | |
- name: Enable app | |
run: php -f nextcloud/occ app:enable ojsxc | |
- name: Run unit tests | |
working-directory: nextcloud/apps/ojsxc | |
run: composer run test |