Browse Source

use latest phpunit version, except for PHP7.2

pull/688/head
korelstar 2 months ago
parent
commit
055c72f443
  1. 8
      .github/workflows/test.yml

8
.github/workflows/test.yml

@ -15,6 +15,7 @@ jobs:
fail-fast: false
env:
SERVER_BRANCH: master
PHPUNIT: phpunit
steps:
- name: Checkout
uses: actions/checkout@v2
@ -22,12 +23,15 @@ jobs:
env:
VERSION_MINMAX: ${{ matrix.version }}
run: echo "PHP_VERSION=$(php tests/nextcloud-version.php --php-$VERSION_MINMAX)" >> $GITHUB_ENV
- name: Use compatible PHPUNIT version for old PHP
if: env.PHP_VERSION == '7.2'
run: echo "PHPUNIT=phpunit:8.5.14" >> $GITHUB_ENV
- name: Set up PHP ${{ env.PHP_VERSION }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
extensions: pdo_mysql, zip, gd
tools: phpunit:8.5.8
tools: ${{ env.PHPUNIT }}
- name: Install Dependencies
run: composer install --prefer-dist
- name: Prepare MySQL database
@ -36,7 +40,7 @@ jobs:
mysql -u root -proot -e "CREATE DATABASE nextcloud;"
mysql -u root -proot -e "CREATE USER 'nextcloud'@'localhost' IDENTIFIED WITH mysql_native_password BY '';"
mysql -u root -proot -e "GRANT ALL ON nextcloud.* TO 'nextcloud'@'localhost';"
- name: Select Nextcloud server branch
- name: Select stable Nextcloud server branch
if: matrix.version == 'min'
run: echo "SERVER_BRANCH=$(php tests/nextcloud-version.php --serverbranch)" >> $GITHUB_ENV
- name: Prepare Nextcloud server using ${{ env.SERVER_BRANCH }}

Loading…
Cancel
Save