diff --git a/.github/actions-lock.txt b/.github/actions-lock.txt new file mode 100644 index 000000000..1940456f7 --- /dev/null +++ b/.github/actions-lock.txt @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT +3c9e67bdc06a172cae6461ab6801f95e appstore-build-publish.yml +e6351c608939c31ae1e32923aa82aa10 dependabot-approve-merge.yml +2581a67c5bcdcd570427e6d51db767d7 fixup.yml +2a205b6cc57c26c31a18a7f41190f3e2 lint-eslint.yml +023b664746d1f2e09a9aaaac772ff7f5 lint-info-xml.yml +660a12f14e32c1b2d24c418232d918da lint-php-cs.yml +ee2b04d185b82fe7dd6fe6d83c6c7b45 lint-php.yml +e8c1aea88c781b9d47186a2f38b209d6 node-test.yml +be4595b4233fc29c9b6fb4a6e71cae6e openapi.yml +c430223b9be698107fc1c10ddd3b4580 phpunit-mariadb.yml +301cb65c1ccc97c22129ad3960ce7f5b phpunit-mysql.yml +fd5eecd6642b35edcff1ab4245a5db76 phpunit-oci.yml +59058fad92d407ffcf16efd401ef1cd5 phpunit-pgsql.yml +dad763027c0d87999474917d6818dbc9 phpunit-sqlite.yml +d1821b8a816578070ed8fd018f321f6d pr-feedback.yml +19d3ab0a48769d30c1cf16b53139b2f8 psalm-matrix.yml +3975dc58817119d596a8f6ed190352ce reuse.yml diff --git a/.github/workflows/appstore-build-publish.yml b/.github/workflows/appstore-build-publish.yml index 5fce6832e..c4cf97f7b 100644 --- a/.github/workflows/appstore-build-publish.yml +++ b/.github/workflows/appstore-build-publish.yml @@ -35,7 +35,7 @@ jobs: echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false path: ${{ env.APP_NAME }} @@ -88,7 +88,7 @@ jobs: filename: ${{ env.APP_NAME }}/appinfo/info.xml - name: Set up php ${{ steps.php-versions.outputs.php-min }} - uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with: php-version: ${{ steps.php-versions.outputs.php-min }} coverage: none @@ -103,9 +103,11 @@ jobs: - name: Install composer dependencies if: steps.check_composer.outputs.files_exists == 'true' - run: | - cd ${{ env.APP_NAME }} - composer install --no-dev + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 + with: + composer-options: '--no-dev' + working-directory: ${{ env.APP_NAME }} + ignore-cache: 'yes' - name: Build ${{ env.APP_NAME }} # Skip if no package.json @@ -157,7 +159,7 @@ jobs: unzip nextcloud.zip - name: Checkout server master fallback - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 if: ${{ steps.server-download.outcome != 'success' }} with: persist-credentials: false diff --git a/.github/workflows/dependabot-approve-merge.yml b/.github/workflows/dependabot-approve-merge.yml index dd28a484a..76340acb5 100644 --- a/.github/workflows/dependabot-approve-merge.yml +++ b/.github/workflows/dependabot-approve-merge.yml @@ -26,6 +26,13 @@ jobs: auto-approve-merge: if: github.event.pull_request.user.login == 'dependabot[bot]' runs-on: ubuntu-latest-low + env: + # env variable for maintainers: 'true' allows to auto-merge 1.0.2 -> 2.0.0 + ALLOW_MAJOR: false + # env variable for maintainers: 'true' allows to auto-merge 1.0.2 -> 1.1.0 + ALLOW_MINOR: true + # env variable for maintainers: RegExp string to ignore some dependencies from auto-approve and auto-merge + IGNORE_PATTERN: '' permissions: # for auto-approve step to work pull-requests: write @@ -46,12 +53,32 @@ jobs: - name: Dependabot metadata id: metadata + if: startsWith(steps.branchname.outputs.branch, 'dependabot/') uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} - - name: GitHub actions bot approve + - name: Check for ignored dependencies in the PR + id: validate if: startsWith(steps.branchname.outputs.branch, 'dependabot/') + env: + IGNORE_PATTERN: ${{ env.IGNORE_PATTERN }} + DEPENDENCY_NAMES: ${{ steps.metadata.outputs.dependency-names }} + run: | + if [[ -z ${IGNORE_PATTERN} ]]; then + echo "ignore=false" >> "$GITHUB_OUTPUT" + elif [[ -z ${DEPENDENCY_NAMES} ]]; then + echo "ignore=false" >> "$GITHUB_OUTPUT" + elif [[ ${DEPENDENCY_NAMES} =~ ${IGNORE_PATTERN} ]]; then + echo "ignore=true" >> "$GITHUB_OUTPUT" + fi + + - name: GitHub actions bot approve + id: auto_approve + if: ${{ + startsWith(steps.branchname.outputs.branch, 'dependabot/') + && steps.validate.outputs.ignore != 'true' + }} run: gh pr review --approve "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} @@ -60,6 +87,15 @@ jobs: # Enable GitHub auto merge - name: Auto merge uses: alexwilson/enable-github-automerge-action@2c32e18a76e0726ffe7a573bfff2d42a20885126 # 3.0.0 - if: startsWith(steps.branchname.outputs.branch, 'dependabot/') && (github.event.action == 'opened' || github.event.action == 'reopened') && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor') + if: ${{ + startsWith(steps.branchname.outputs.branch, 'dependabot/') + && steps.auto_approve.conclusion == 'success' + && (github.event.action == 'opened' || github.event.action == 'reopened') + && ( + steps.metadata.outputs.update-type == 'version-update:semver-patch' + || (fromJSON(env.ALLOW_MINOR) && steps.metadata.outputs.update-type == 'version-update:semver-minor') + || (fromJSON(env.ALLOW_MAJOR) && steps.metadata.outputs.update-type == 'version-update:semver-major') + ) + }} with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml index fe436c9ad..3e34f7e8c 100644 --- a/.github/workflows/lint-eslint.yml +++ b/.github/workflows/lint-eslint.yml @@ -56,7 +56,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false diff --git a/.github/workflows/lint-info-xml.yml b/.github/workflows/lint-info-xml.yml index f2335b70e..e55705222 100644 --- a/.github/workflows/lint-info-xml.yml +++ b/.github/workflows/lint-info-xml.yml @@ -24,9 +24,11 @@ jobs: name: info.xml lint steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false + sparse-checkout: | + appinfo/ - name: Download schema run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index 398bf820d..0a65977be 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false @@ -34,7 +34,7 @@ jobs: uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 - name: Set up php${{ steps.versions.outputs.php-min }} - uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with: php-version: ${{ steps.versions.outputs.php-min }} extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite @@ -43,10 +43,12 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install dependencies + - name: Remove nextcloud/ocp run: | composer remove nextcloud/ocp --dev --no-scripts - composer i + + - name: Install composer dependencies + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 - name: Lint run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 ) diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index 90bb29087..cb2684b24 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -25,7 +25,7 @@ jobs: php-max: ${{ steps.versions.outputs.php-max }} steps: - name: Checkout app - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false @@ -34,7 +34,7 @@ jobs: uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 php-lint: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low needs: matrix strategy: matrix: @@ -44,12 +44,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with: php-version: ${{ matrix.php-versions }} extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml index fb44ed3df..97c5cb991 100644 --- a/.github/workflows/node-test.yml +++ b/.github/workflows/node-test.yml @@ -60,7 +60,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.yml index 925dd8dbb..20c1a5cb9 100644 --- a/.github/workflows/openapi.yml +++ b/.github/workflows/openapi.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false @@ -35,7 +35,7 @@ jobs: uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 - name: Set up php - uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with: php-version: ${{ steps.php_versions.outputs.php-available }} extensions: xml @@ -78,8 +78,8 @@ jobs: run: | npm ci - - name: Set up dependencies - run: composer i + - name: Install composer dependencies + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 - name: Regenerate OpenAPI run: composer run openapi diff --git a/.github/workflows/phpunit-mariadb.yml b/.github/workflows/phpunit-mariadb.yml index 3d2c60016..f8b8d80e6 100644 --- a/.github/workflows/phpunit-mariadb.yml +++ b/.github/workflows/phpunit-mariadb.yml @@ -25,7 +25,7 @@ jobs: server-max: ${{ steps.versions.outputs.branches-max-list }} steps: - name: Checkout app - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false @@ -67,6 +67,7 @@ jobs: if: needs.changes.outputs.src != 'false' strategy: + fail-fast: false matrix: php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }} server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} @@ -91,7 +92,7 @@ jobs: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - name: Checkout server - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false submodules: true @@ -99,7 +100,7 @@ jobs: ref: ${{ matrix.server-versions }} - name: Checkout app - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false path: apps/${{ env.APP_NAME }} @@ -113,7 +114,7 @@ jobs: path: apps/circles - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -136,13 +137,17 @@ jobs: with: files: apps/${{ env.APP_NAME }}/composer.json - - name: Set up dependencies + - name: Remove nextcloud/ocp # Only run if phpunit config file exists if: steps.check_composer.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: | composer remove nextcloud/ocp --dev --no-scripts - composer i + + - name: Install composer dependencies + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 + with: + working-directory: apps/${{ env.APP_NAME }} - name: Set up Nextcloud env: diff --git a/.github/workflows/phpunit-mariadb.yml.patch b/.github/workflows/phpunit-mariadb.yml.patch new file mode 100644 index 000000000..2cf0aa026 --- /dev/null +++ b/.github/workflows/phpunit-mariadb.yml.patch @@ -0,0 +1,37 @@ +diff --git a/.github/workflows/phpunit-mariadb.yml b/.github/workflows/phpunit-mariadb.yml +index 2e7b92b0..f8b8d80e 100644 +--- a/.github/workflows/phpunit-mariadb.yml ++++ b/.github/workflows/phpunit-mariadb.yml +@@ -105,6 +105,14 @@ jobs: + persist-credentials: false + path: apps/${{ env.APP_NAME }} + ++ - name: Checkout teams dependency ++ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 ++ with: ++ persist-credentials: false ++ repository: nextcloud/circles ++ ref: ${{ matrix.server-versions }} ++ path: apps/circles ++ + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 + with: +@@ -160,7 +168,7 @@ jobs: + # Only run if phpunit config file exists + if: steps.check_phpunit.outcome == 'success' + working-directory: apps/${{ env.APP_NAME }} +- run: composer run test:unit ++ run: composer run test:unit -- --no-coverage + + - name: Check PHPUnit integration script is defined + id: check_integration +@@ -178,7 +186,7 @@ jobs: + # Only run if phpunit integration config file exists + if: steps.check_integration.outcome == 'success' + working-directory: apps/${{ env.APP_NAME }} +- run: composer run test:integration ++ run: composer run test:integration -- --no-coverage + + - name: Print logs + if: always() diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index 18a290d41..b3c709922 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -24,7 +24,7 @@ jobs: matrix: ${{ steps.versions.outputs.sparse-matrix }} steps: - name: Checkout app - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false @@ -68,6 +68,7 @@ jobs: if: needs.changes.outputs.src != 'false' strategy: + fail-fast: false matrix: ${{ fromJson(needs.matrix.outputs.matrix) }} name: MySQL ${{ matrix.mysql-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }} @@ -89,7 +90,7 @@ jobs: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - name: Checkout server - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false submodules: true @@ -97,7 +98,7 @@ jobs: ref: ${{ matrix.server-versions }} - name: Checkout app - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false path: apps/${{ env.APP_NAME }} @@ -111,7 +112,7 @@ jobs: path: apps/circles - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -134,13 +135,17 @@ jobs: with: files: apps/${{ env.APP_NAME }}/composer.json - - name: Set up dependencies + - name: Remove nextcloud/ocp # Only run if phpunit config file exists if: steps.check_composer.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: | composer remove nextcloud/ocp --dev --no-scripts - composer i + + - name: Install composer dependencies + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 + with: + working-directory: apps/${{ env.APP_NAME }} - name: Set up Nextcloud env: diff --git a/.github/workflows/phpunit-mysql.yml.patch b/.github/workflows/phpunit-mysql.yml.patch new file mode 100644 index 000000000..2861dfc19 --- /dev/null +++ b/.github/workflows/phpunit-mysql.yml.patch @@ -0,0 +1,37 @@ +diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml +index 596d91ea..b3c70992 100644 +--- a/.github/workflows/phpunit-mysql.yml ++++ b/.github/workflows/phpunit-mysql.yml +@@ -103,6 +103,14 @@ jobs: + persist-credentials: false + path: apps/${{ env.APP_NAME }} + ++ - name: Checkout teams dependency ++ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 ++ with: ++ persist-credentials: false ++ repository: nextcloud/circles ++ ref: ${{ matrix.server-versions }} ++ path: apps/circles ++ + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 + with: +@@ -158,7 +166,7 @@ jobs: + # Only run if phpunit config file exists + if: steps.check_phpunit.outcome == 'success' + working-directory: apps/${{ env.APP_NAME }} +- run: composer run test:unit ++ run: composer run test:unit -- --no-coverage + + - name: Check PHPUnit integration script is defined + id: check_integration +@@ -176,7 +184,7 @@ jobs: + # Only run if phpunit integration config file exists + if: steps.check_integration.outcome == 'success' + working-directory: apps/${{ env.APP_NAME }} +- run: composer run test:integration ++ run: composer run test:integration -- --no-coverage + + - name: Print logs + if: always() diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml index 56314c64f..82c0f8981 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -25,7 +25,7 @@ jobs: server-max: ${{ steps.versions.outputs.branches-max-list }} steps: - name: Checkout app - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false @@ -67,6 +67,7 @@ jobs: if: needs.changes.outputs.src != 'false' strategy: + fail-fast: false matrix: php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }} server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} @@ -101,7 +102,7 @@ jobs: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - name: Checkout server - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false submodules: true @@ -109,7 +110,7 @@ jobs: ref: ${{ matrix.server-versions }} - name: Checkout app - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false path: apps/${{ env.APP_NAME }} @@ -123,7 +124,7 @@ jobs: path: apps/circles - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -141,13 +142,17 @@ jobs: with: files: apps/${{ env.APP_NAME }}/composer.json - - name: Set up dependencies + - name: Remove nextcloud/ocp # Only run if phpunit config file exists if: steps.check_composer.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: | composer remove nextcloud/ocp --dev --no-scripts - composer i + + - name: Install composer dependencies + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 + with: + working-directory: apps/${{ env.APP_NAME }} - name: Set up Nextcloud env: diff --git a/.github/workflows/phpunit-oci.yml.patch b/.github/workflows/phpunit-oci.yml.patch new file mode 100644 index 000000000..1114a641e --- /dev/null +++ b/.github/workflows/phpunit-oci.yml.patch @@ -0,0 +1,37 @@ +diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml +index 4314399b..82c0f898 100644 +--- a/.github/workflows/phpunit-oci.yml ++++ b/.github/workflows/phpunit-oci.yml +@@ -115,6 +115,14 @@ jobs: + persist-credentials: false + path: apps/${{ env.APP_NAME }} + ++ - name: Checkout teams dependency ++ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 ++ with: ++ persist-credentials: false ++ repository: nextcloud/circles ++ ref: ${{ matrix.server-versions }} ++ path: apps/circles ++ + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 + with: +@@ -165,7 +173,7 @@ jobs: + # Only run if phpunit config file exists + if: steps.check_phpunit.outcome == 'success' + working-directory: apps/${{ env.APP_NAME }} +- run: composer run test:unit ++ run: composer run test:unit -- --no-coverage + + - name: Check PHPUnit integration script is defined + id: check_integration +@@ -183,7 +191,7 @@ jobs: + # Only run if phpunit integration config file exists + if: steps.check_integration.outcome == 'success' + working-directory: apps/${{ env.APP_NAME }} +- run: composer run test:integration ++ run: composer run test:integration -- --no-coverage + + - name: Print logs + if: always() diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml index 9bd63205b..b7a2d3fad 100644 --- a/.github/workflows/phpunit-pgsql.yml +++ b/.github/workflows/phpunit-pgsql.yml @@ -25,7 +25,7 @@ jobs: server-max: ${{ steps.versions.outputs.branches-max-list }} steps: - name: Checkout app - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false @@ -67,6 +67,7 @@ jobs: if: needs.changes.outputs.src != 'false' strategy: + fail-fast: false matrix: php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }} server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} @@ -92,7 +93,7 @@ jobs: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - name: Checkout server - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false submodules: true @@ -100,7 +101,7 @@ jobs: ref: ${{ matrix.server-versions }} - name: Checkout app - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false path: apps/${{ env.APP_NAME }} @@ -114,7 +115,7 @@ jobs: path: apps/circles - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -132,13 +133,17 @@ jobs: with: files: apps/${{ env.APP_NAME }}/composer.json - - name: Set up dependencies + - name: Remove nextcloud/ocp # Only run if phpunit config file exists if: steps.check_composer.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: | composer remove nextcloud/ocp --dev --no-scripts - composer i + + - name: Install composer dependencies + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 + with: + working-directory: apps/${{ env.APP_NAME }} - name: Set up Nextcloud env: diff --git a/.github/workflows/phpunit-pgsql.yml.patch b/.github/workflows/phpunit-pgsql.yml.patch new file mode 100644 index 000000000..71a91f8d0 --- /dev/null +++ b/.github/workflows/phpunit-pgsql.yml.patch @@ -0,0 +1,37 @@ +diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml +index dab23f2e..b7a2d3fa 100644 +--- a/.github/workflows/phpunit-pgsql.yml ++++ b/.github/workflows/phpunit-pgsql.yml +@@ -106,6 +106,14 @@ jobs: + persist-credentials: false + path: apps/${{ env.APP_NAME }} + ++ - name: Checkout teams dependency ++ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 ++ with: ++ persist-credentials: false ++ repository: nextcloud/circles ++ ref: ${{ matrix.server-versions }} ++ path: apps/circles ++ + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 + with: +@@ -156,7 +164,7 @@ jobs: + # Only run if phpunit config file exists + if: steps.check_phpunit.outcome == 'success' + working-directory: apps/${{ env.APP_NAME }} +- run: composer run test:unit ++ run: composer run test:unit -- --no-coverage + + - name: Check PHPUnit integration script is defined + id: check_integration +@@ -174,7 +182,7 @@ jobs: + # Only run if phpunit integration config file exists + if: steps.check_integration.outcome == 'success' + working-directory: apps/${{ env.APP_NAME }} +- run: composer run test:integration ++ run: composer run test:integration -- --no-coverage + + - name: Print logs + if: always() diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index f27bd19d5..d1d674a78 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -25,7 +25,7 @@ jobs: server-max: ${{ steps.versions.outputs.branches-max-list }} steps: - name: Checkout app - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false @@ -67,6 +67,7 @@ jobs: if: needs.changes.outputs.src != 'false' strategy: + fail-fast: false matrix: php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }} server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} @@ -81,7 +82,7 @@ jobs: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - name: Checkout server - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false submodules: true @@ -89,7 +90,7 @@ jobs: ref: ${{ matrix.server-versions }} - name: Checkout app - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false path: apps/${{ env.APP_NAME }} @@ -111,7 +112,7 @@ jobs: path: apps/analytics - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -129,13 +130,17 @@ jobs: with: files: apps/${{ env.APP_NAME }}/composer.json - - name: Set up dependencies + - name: Remove nextcloud/ocp # Only run if phpunit config file exists if: steps.check_composer.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: | composer remove nextcloud/ocp --dev --no-scripts - composer i + + - name: Install composer dependencies + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 + with: + working-directory: apps/${{ env.APP_NAME }} - name: Set up Nextcloud env: diff --git a/.github/workflows/phpunit-sqlite.yml.patch b/.github/workflows/phpunit-sqlite.yml.patch new file mode 100644 index 000000000..dddf9a258 --- /dev/null +++ b/.github/workflows/phpunit-sqlite.yml.patch @@ -0,0 +1,67 @@ +diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml +index 273400a4..d1d674a7 100644 +--- a/.github/workflows/phpunit-sqlite.yml ++++ b/.github/workflows/phpunit-sqlite.yml +@@ -95,13 +95,29 @@ jobs: + persist-credentials: false + path: apps/${{ env.APP_NAME }} + ++ - name: Checkout teams app ++ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 ++ with: ++ persist-credentials: false ++ repository: nextcloud/circles ++ ref: ${{ matrix.server-versions }} ++ path: apps/circles ++ ++ - name: Checkout analytics app ++ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 ++ with: ++ persist-credentials: false ++ repository: rello/analytics ++ ref: master ++ path: apps/analytics ++ + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 + with: + php-version: ${{ matrix.php-versions }} + # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation + extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite +- coverage: none ++ coverage: xdebug + ini-file: development + # Temporary workaround for missing pcntl_* in PHP 8.3 + ini-values: disable_functions= +@@ -147,6 +163,15 @@ jobs: + working-directory: apps/${{ env.APP_NAME }} + run: composer run test:unit + ++ - name: Upload Unit coverage ++ uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 ++ with: ++ working-directory: apps/${{ env.APP_NAME }} ++ disable_search: true ++ files: tests/clover.unit.xml ++ fail_ci_if_error: true ++ flags: unit ++ + - name: Check PHPUnit integration script is defined + id: check_integration + continue-on-error: true +@@ -165,6 +190,15 @@ jobs: + working-directory: apps/${{ env.APP_NAME }} + run: composer run test:integration + ++ - name: Upload Integration coverage ++ uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 ++ with: ++ working-directory: apps/${{ env.APP_NAME }} ++ disable_search: true ++ files: tests/clover.integration.xml ++ fail_ci_if_error: true ++ flags: integration ++ + - name: Print logs + if: always() + run: | diff --git a/.github/workflows/pr-feedback.yml b/.github/workflows/pr-feedback.yml index f4c0477ce..4420bf692 100644 --- a/.github/workflows/pr-feedback.yml +++ b/.github/workflows/pr-feedback.yml @@ -36,7 +36,7 @@ jobs: blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -) echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT" - - uses: nextcloud/pr-feedback-action@f0cab224dea8e1f282f9451de322f323c78fc7a5 # main + - uses: nextcloud/pr-feedback-action@5227c55be184087d0aef6338bee210d8620b6297 # v1.0.1 with: feedback-message: | Hello there, diff --git a/.github/workflows/psalm-matrix.yml b/.github/workflows/psalm-matrix.yml index 112450d89..b2d0ff1ef 100644 --- a/.github/workflows/psalm-matrix.yml +++ b/.github/workflows/psalm-matrix.yml @@ -25,7 +25,7 @@ jobs: php-min: ${{ steps.versions.outputs.php-min }} steps: - name: Checkout app - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false @@ -47,12 +47,12 @@ jobs: name: static-psalm-analysis ${{ matrix.ocp-version }} steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - name: Set up php${{ needs.matrix.outputs.php-min }} - uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with: php-version: ${{ needs.matrix.outputs.php-min }} extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite @@ -63,13 +63,17 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install dependencies + - name: Remove nextcloud/ocp run: | composer remove nextcloud/ocp --dev --no-scripts - composer i - - name: Install dependencies # zizmor: ignore[template-injection] - run: composer require --dev 'nextcloud/ocp:${{ matrix.ocp-version }}' --ignore-platform-reqs --with-dependencies + - name: Install composer dependencies + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 + + - name: Install nextcloud/ocp:${{ matrix.ocp-version }} + env: + OCP_VERSION: ${{ matrix.ocp-version }} + run: composer require --dev "nextcloud/ocp:$OCP_VERSION" --ignore-platform-reqs --with-dependencies - name: Run coding standards check run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index a60e9e262..4e1a74194 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest-low steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false diff --git a/REUSE.toml b/REUSE.toml index 6518d3e04..c3b20471a 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -5,6 +5,12 @@ SPDX-PackageName = "forms" SPDX-PackageSupplier = "Nextcloud " SPDX-PackageDownloadLocation = "https://github.com/nextcloud/forms" +[[annotations]] +path = [".github/workflows/*.patch"] +precedence = "aggregate" +SPDX-FileCopyrightText = "none" +SPDX-License-Identifier = "CC0-1.0" + [[annotations]] path = ["l10n/**.js", "l10n/**.json", "js/**.js.map", "js/**.js"] precedence = "aggregate"