Merge pull request #50 from nextcloud/releases/2.0.0 #21
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: PHPUnit | |
on: | |
pull_request: | |
paths: | |
- .github/workflows/phpunit.yml | |
- appinfo/** | |
- composer.* | |
- lib/** | |
- templates/** | |
- tests/** | |
push: | |
branches: | |
- main | |
- stable* | |
- test | |
paths: | |
- .github/workflows/phpunit.yml | |
- appinfo/** | |
- composer.* | |
- lib/** | |
- templates/** | |
- tests/** | |
env: | |
APP_NAME: integration_mattermost | |
jobs: | |
php: | |
runs-on: ubuntu-latest | |
strategy: | |
# do not stop on another job's failure | |
fail-fast: false | |
matrix: | |
php-versions: ['8.0', '8.1', '8.2', '8.3'] | |
server-versions: ['stable28', 'stable29', 'stable30', 'master'] | |
exclude: | |
- php-versions: '8.0' | |
server-versions: 'master' | |
- php-versions: '8.0' | |
server-versions: 'stable30' | |
name: php${{ matrix.php-versions }}-sqlite-${{ matrix.server-versions }} | |
steps: | |
- name: Checkout server | |
uses: actions/checkout@v2 | |
with: | |
repository: nextcloud/server | |
ref: ${{ matrix.server-versions }} | |
submodules: true | |
- name: Checkout app | |
uses: actions/checkout@v2 | |
with: | |
path: apps/${{ env.APP_NAME }} | |
- name: Set up php ${{ matrix.php-versions }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
tools: phpunit | |
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, gd, zip | |
- name: Set up PHPUnit | |
working-directory: apps/${{ env.APP_NAME }} | |
run: composer i | |
- name: Set up Nextcloud | |
run: | | |
mkdir data | |
./occ maintenance:install --verbose --database=sqlite --admin-user admin --admin-pass admin | |
./occ app:enable --force ${{ env.APP_NAME }} | |
- name: PHPUnit | |
working-directory: apps/${{ env.APP_NAME }} | |
run: composer run test |