Skip to content

Hide e-mail controls in calendar when e-mail sending is disabled #9929

Hide e-mail controls in calendar when e-mail sending is disabled

Hide e-mail controls in calendar when e-mail sending is disabled #9929

Workflow file for this run

# SPDX-FileCopyrightText: 2020-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: PHP Tests
on: pull_request
jobs:
changes:
runs-on: ubuntu-latest-low
permissions:
contents: read
pull-requests: read
outputs:
backend: ${{ steps.changes.outputs.backend }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 1
sparse-checkout: .github/changes-filters.yml
sparse-checkout-cone-mode: false
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
filters: .github/changes-filters.yml
unit-tests:
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.backend != 'false'
strategy:
matrix:
php-versions: [ '8.3', '8.4', '8.5' ]
nextcloud-versions: [ 'master' ]
include:
- php-versions: '8.5'
nextcloud-versions: 'stable35'
- php-versions: '8.4'
nextcloud-versions: 'stable34'
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@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with verbose logging due to stuck runs
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: Patch version check for nightly PHP
if: ${{ matrix.php-versions == '8.4' }}
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 the app
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: nextcloud/apps/calendar
- name: Install dependencies
working-directory: nextcloud/apps/calendar
run: composer install
- name: Run tests
working-directory: nextcloud/apps/calendar
run: composer run test:unit
- name: Upload coverage to Codecov
if: ${{ matrix.nextcloud-versions == 'master' }}
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: nextcloud/apps/calendar/clover.unit.xml
flags: php
fail_ci_if_error: ${{ !github.event.pull_request.head.repo.fork }}
verbose: true
integration-tests:
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.backend != 'false'
strategy:
matrix:
php-versions: [ '8.3', '8.4', '8.5' ]
nextcloud-versions: [ 'master' ]
include:
- php-versions: '8.5'
nextcloud-versions: 'stable35'
- php-versions: '8.4'
nextcloud-versions: 'stable34'
name: php${{ matrix.php-versions }} on ${{ matrix.nextcloud-versions }} integration tests
env:
CI: true
XDEBUG_MODE: coverage
steps:
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with verbose logging due to stuck runs
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: Patch version check for nightly PHP
if: ${{ matrix.php-versions == '8.4' }}
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 the app
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: nextcloud/apps/calendar
- name: Install dependencies
working-directory: nextcloud/apps/calendar
run: composer install
- name: Install Calendar
run: php -f nextcloud/occ app:enable calendar
- name: Run tests
working-directory: nextcloud/apps/calendar
run: composer run test:integration
summary:
runs-on: ubuntu-latest-low
needs:
- unit-tests
- integration-tests
if: always()
name: php-test-summary
steps:
- name: Unit test status
run: if ${{ needs.unit-tests.result != 'success' && needs.unit-tests.result != 'skipped' }}; then exit 1; fi
- name: Integration test status
run: if ${{ needs.integration-tests.result != 'success' && needs.integration-tests.result != 'skipped' }}; then exit 1; fi