Skip to content

Scan photos of specific directory #1071

Scan photos of specific directory

Scan photos of specific directory #1071

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- main
- stable*
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [8.1, 8.2, 8.3]
nextcloud-versions: ['stable30']
name: Nextcloud ${{ matrix.nextcloud-versions }} php${{ matrix.php-versions }} unit tests
steps:
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@master
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: 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 Viewer
run: git clone https://github.com/nextcloud/viewer.git -b ${{ matrix.nextcloud-versions }} viewer
working-directory: nextcloud/apps
- name: Enable Viewer
run: php -f nextcloud/occ app:enable viewer
- name: Checkout Maps
uses: actions/checkout@v3
with:
path: nextcloud/apps/maps
- name: Install dependencies
working-directory: nextcloud/apps/maps
run: composer install
- name: Enable maps app
working-directory: nextcloud
run: php -f occ app:enable maps
- name: Run tests
if: ${{ always() && matrix.php-versions != 8.1 }}
working-directory: nextcloud/apps/maps
run: composer run test:unit
env:
XDEBUG_MODE: coverage
- name: Run tests
if: ${{ always() && matrix.php-versions == 8.1 }}
working-directory: nextcloud/apps/maps
run: composer run test:unit
env:
XDEBUG_MODE: off
- name: Report coverage
uses: codecov/[email protected]
if: ${{ always() && matrix.nextcloud-versions == 'master' && matrix.php-versions != 8.1}}
with:
file: ./nextcloud/apps/maps/tests/clover.unit.xml
flags: unittests
fail_ci_if_error: true
frontend-unit-test:
runs-on: ubuntu-latest
name: Front-end unit tests
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 12.x
- name: npm ci
run: npm ci
env:
CI: true