Skip to content

chore(deps): lock file maintenance #545

chore(deps): lock file maintenance

chore(deps): lock file maintenance #545

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- main
- feature/*
workflow_dispatch:
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['8.0', '8.1', '8.2']
nextcloud-versions: ['stable27', 'stable28']
include:
- php-versions: 8.2
nextcloud-versions: stable26
- php-versions: 8.2
nextcloud-versions: stable25
- php-versions: 8.0
nextcloud-versions: stable24
- php-versions: 8.0
nextcloud-versions: stable23
- php-versions: 8.0
nextcloud-versions: stable22
name: Nextcloud ${{ matrix.nextcloud-versions }} php${{ matrix.php-versions }} unit tests
steps:
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype,curl,dom,gd,iconv,intl,json,mbstring,openssl,posix,sqlite,xml,zip,gmp
coverage: xdebug
- name: Checkout Nextcloud
run: git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.nextcloud-versions }} nextcloud
- name: Patch version check for nightly PHP
if: ${{ matrix.php-versions == '8.2' }}
run: echo "<?php" > nextcloud/lib/versioncheck.php
- 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 webapppassword
uses: actions/checkout@v4
with:
path: nextcloud/apps/webapppassword
- name: Test app
run: |
php -f nextcloud/occ app:enable webapppassword
- name: Run tests
run: |
cd nextcloud
php -S localhost:8080 &
cd apps/webapppassword
php /usr/local/bin/composer require --dev christophwurst/nextcloud:dev-${{ matrix.nextcloud-versions }}
make test
php /usr/local/bin/composer install
#result=0
#php /usr/local/bin/composer run cs || result=1
#php /usr/local/bin/composer run phpstan || result=1
#php /usr/local/bin/composer run psalm || result=1
#exit $result
if: ${{ matrix.php-versions == '7.4' }}
# - name: Run tests
# working-directory: nextcloud/apps/webapppassword
# run: composer global require phpunit/phpunit && phpunit -c phpunit.coverage.xml --coverage-clover build/logs/clover.xml
# if: ${{ matrix.php-versions == '7.4' }}
# env:
# XDEBUG_MODE: coverage