diff --git a/.github/actions-lock.txt b/.github/actions-lock.txt index d3643bbb8..c51d0fd3d 100644 --- a/.github/actions-lock.txt +++ b/.github/actions-lock.txt @@ -1,22 +1,23 @@ # SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors # SPDX-License-Identifier: MIT -fe1239ed98a163abbdea3e0490c85458 appstore-build-publish.yml +ed8f08fe0c056080f6afef29f15b2d49 appstore-build-publish.yml e6351c608939c31ae1e32923aa82aa10 dependabot-approve-merge.yml 2581a67c5bcdcd570427e6d51db767d7 fixup.yml -985f3ac7d51405c1601c742832a14120 lint-eslint.yml +dc0ae733f35c60274937c2647c027d46 lint-eslint.yml 43fd0c5fb704cabc5f11cdfaf513236d lint-info-xml.yml -4b40dd0073e16f74dd04e6d49dcc043d lint-php-cs.yml -cfb31e47b6e9ab65e76c89b028754a4e lint-php.yml +79006ab196f5664fc444e63645cfd8a7 lint-php-cs.yml +300be6a756abda800e40850918f2d964 lint-php.yml ab3a506506b1d7c1cea9593ecfd84366 lint-stylelint.yml -3b1f38e378f8e764b0b3c560a8cfe1cd node-test.yml -65678bf15deefb099dea5410459a7c17 openapi.yml -076e72a19e7bdf35ac5b2abee0198c43 phpunit-mariadb.yml -8fab08ac7da700ee304af0bf3c18b3a3 phpunit-mysql.yml -bbe9834ddb89207caf5e19d79ebb3672 phpunit-oci.yml -256bf1dead4ef8479e9ce7433f871548 phpunit-pgsql.yml -4ca2c2c4b1a73182667bab908e57c185 phpunit-sqlite.yml -d1821b8a816578070ed8fd018f321f6d pr-feedback.yml -43878db2acac51746332618c9f731553 psalm-matrix.yml -6aa9eaa284ed1800168c96b97e90d582 rector-apply.yml +d5f511793e785e83842609afc0317b24 node-test.yml +b45e44d9ffe39586b38b6a925c1a9740 openapi.yml +2c5f31d4cece1f2758df93e35d49cf0c phpunit-mariadb.yml +4ced3302b18f5a32829eadde7a02400c phpunit-mysql.yml +02dde22c83fc396f4f566f589494486f phpunit-oci.yml +c3d489abcf3148e277f023afaa9e2182 phpunit-pgsql.yml +e86927ad532dd0eb6b20f3a48274cc82 phpunit-sqlite.yml +aaa395a26591445ccf4c8196d7f01ee7 pr-feedback.yml +6c355cb7b5d4da4d56a58e6d7f82881b psalm-matrix.yml +c2fc57f15bc64e5066b79a398021ca1a rector-apply.yml 2dbec18233063b42f4d8e03bbb43671c reuse.yml -94c65e30a77686c079c6dfa54a008440 sync-workflow-templates.yml +b47a9fe981a7435caea92db33f5ad121 sync-workflow-templates.yml +0d4a72e82e345087f423a23cd06ab28c playwright.yml diff --git a/.github/workflows/appstore-build-publish.yml b/.github/workflows/appstore-build-publish.yml index c90f13321..699f6d691 100644 --- a/.github/workflows/appstore-build-publish.yml +++ b/.github/workflows/appstore-build-publish.yml @@ -83,7 +83,7 @@ jobs: - name: Get php version id: php-versions - uses: icewind1991/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 with: filename: ${{ env.APP_NAME }}/appinfo/info.xml @@ -194,7 +194,7 @@ jobs: overwrite: true - name: Upload app to Nextcloud appstore - uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3 + uses: nextcloud-libraries/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3 with: app_name: ${{ env.APP_NAME }} appstore_token: ${{ secrets.APPSTORE_TOKEN }} diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index bcb4ca720..06d0842fd 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -31,7 +31,7 @@ jobs: - name: Get php version id: versions - uses: icewind1991/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 - name: Set up php${{ steps.versions.outputs.php-min }} uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index b6ea62d1e..e4c6e9ba6 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -31,7 +31,7 @@ jobs: - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 php-lint: runs-on: ubuntu-latest-low diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.yml index 7d63f92ce..748565611 100644 --- a/.github/workflows/openapi.yml +++ b/.github/workflows/openapi.yml @@ -32,7 +32,7 @@ jobs: - name: Get php version id: php_versions - uses: icewind1991/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 - name: Set up php uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 diff --git a/.github/workflows/phpunit-mariadb.yml b/.github/workflows/phpunit-mariadb.yml index 344a01962..7e7610724 100644 --- a/.github/workflows/phpunit-mariadb.yml +++ b/.github/workflows/phpunit-mariadb.yml @@ -31,7 +31,7 @@ jobs: - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 changes: runs-on: ubuntu-latest-low diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index cdf37c584..a7c2b386f 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -30,7 +30,7 @@ jobs: - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 with: matrix: '{"mysql-versions": ["8.4"]}' @@ -104,7 +104,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Checkout teams dependency - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false repository: nextcloud/circles diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml index 360df3fa3..99eee3e31 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -31,7 +31,7 @@ jobs: - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 changes: runs-on: ubuntu-latest-low diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml index 12cabdd61..3d318e4b9 100644 --- a/.github/workflows/phpunit-pgsql.yml +++ b/.github/workflows/phpunit-pgsql.yml @@ -31,7 +31,7 @@ jobs: - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 changes: runs-on: ubuntu-latest-low diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index ddd7e4f3d..63bc7ec8c 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -31,7 +31,7 @@ jobs: - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 changes: runs-on: ubuntu-latest-low diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index aeb8c2669..3f1ab4873 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,62 +1,197 @@ -# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors # SPDX-License-Identifier: MIT + +# This workflow runs Playwright tests on pull requests to the master and stable branches. +# It expects the following npm scripts to be defined in package.json: +# - "playwright": runs the Playwright tests +# - "playwright:install-ci": installs the Playwright browsers for CI (optional) +# +# If you only use the "Desktop Chrome" browser with "channel: chrome" in your Playwright config, +# you can skip the "playwright:install-ci" script as the GitHub Actions runner already has Chrome Browser installed. +# +# For merging the reports, it expects a Playwright merge config file at tests/playwright/merge.config.ts. +# You can adjust the path in the "Merge into HTML Report" step if you have a different location for the merge config file. +# The default configuration would look like this: +# ```js +# export default { +# testDir: 'tests/playwright/e2e', // path to your Playwright tests +# reporter: [['html', { open: 'never' }]], +# } +# ``` + name: Playwright Tests + on: pull_request: - branches: [main] + branches: + - master + - stable35 + - stable34 + - stable33 permissions: contents: read +concurrency: + group: node-${{ github.head_ref || github.run_id }} + cancel-in-progress: true jobs: - test: - timeout-minutes: 60 + playwright-setup: + timeout-minutes: 10 + name: Playwright setup + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Read package.json + uses: nextcloud-libraries/parse-package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0 + id: versions + - name: Set up node + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: ${{ steps.versions.outputs.node-version }} + - name: Set up npm + run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}' + - name: Install dependencies and build + run: | + npm ci + npm run build --if-present + - name: Save context + uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + key: playwright-context-${{ github.run_id }} + path: ./ + + playwright-tests: + needs: [playwright-setup] + timeout-minutes: 30 + name: Playwright tests ${{ matrix.shardIndex }} / ${{ matrix.shardTotal }} runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + shardIndex: [1, 2] # adjust to your needs + shardTotal: [2] + outputs: + node-version: ${{ steps.versions.outputs.node-version }} + package-manager-version: ${{ steps.versions.outputs.package-manager-version }} + + steps: + - name: Restore context + id: cache + uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + key: playwright-context-${{ github.run_id }} + path: ./ + + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + if: steps.cache.outputs.cache-hit != 'true' + with: + persist-credentials: false + + - name: Read package.json + uses: nextcloud-libraries/parse-package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0 + id: versions + + - name: Set up node + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: ${{ steps.versions.outputs.node-version }} + + - name: Set up npm + run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}' + + - name: Install dependencies and build + if: steps.cache.outputs.cache-hit != 'true' + run: | + npm ci + npm run build --if-present + + - name: Install Playwright browsers + run: npm run playwright:install-ci --if-present + + - name: Run Playwright tests + run: npm run playwright -- --shard='${{ matrix.shardIndex }}/${{ matrix.shardTotal }}' + + - name: Upload blob report to GitHub Actions Artifacts + if: ${{ !cancelled() }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: blob-report-${{ matrix.shardIndex }} + path: blob-report + retention-days: 1 + + merge-reports: + # Merge reports after playwright-tests, even if some shards have failed + if: ${{ !cancelled() }} + needs: [playwright-tests] + + runs-on: ubuntu-latest-low + steps: + - name: Restore context + id: cache + uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + key: playwright-context-${{ github.run_id }} + path: ./ + + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + if: steps.cache.outputs.cache-hit != 'true' + with: + persist-credentials: false + + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + if: steps.cache.outputs.cache-hit != 'true' + with: + node-version: ${{ needs.playwright-tests.outputs.node-version }} + + - name: Set up npm + if: steps.cache.outputs.cache-hit != 'true' + run: npm i -g 'npm@${{ needs.playwright-tests.outputs.package-manager-version }}' + + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: npm ci + + - name: Download blob reports from GitHub Actions Artifacts + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + path: all-blob-reports + pattern: blob-report-* + merge-multiple: true + + - name: Merge into HTML Report + run: npx playwright merge-reports --config tests/playwright/merge.config.ts --reporter html,github ./all-blob-reports + + - name: Upload HTML report + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: html-report--attempt-${{ github.run_attempt }} + path: playwright-report + retention-days: 7 + + - name: How to show the logs + run: | + echo 'To view the report:' + echo ' 1. Extract the folder from the zip file' + echo ' 2. run "npx playwright show-report name-of-my-extracted-playwright-report"' + + summary: + permissions: + contents: none + runs-on: ubuntu-latest-low + needs: [playwright-tests] + + if: always() + + name: playwright-test-summary + steps: - - name: Checkout app - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Check composer.json - id: check_composer - uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v2 - with: - files: 'composer.json' - - - name: Install composer dependencies - if: steps.check_composer.outputs.files_exists == 'true' - run: composer install --no-dev - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 - id: versions - with: - fallbackNode: '^20' - fallbackNpm: '^10' - - - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 - with: - node-version: ${{ steps.versions.outputs.nodeVersion }} - - - name: Set up npm ${{ steps.versions.outputs.npmVersion }} - run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - - - name: Install node dependencies & build app - run: | - npm ci - TESTING=true npm run build --if-present - - - name: Install Playwright Browsers - run: npx playwright install chromium --only-shell - - - name: Run Playwright tests - run: npx playwright test - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: always() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 + - name: Summary status + run: if ${{ needs.playwright-tests.result != 'success' }}; then exit 1; fi \ No newline at end of file diff --git a/.github/workflows/pr-feedback.yml b/.github/workflows/pr-feedback.yml index 4420bf692..1bd9c59ac 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@5227c55be184087d0aef6338bee210d8620b6297 # v1.0.1 + - uses: nextcloud-libraries/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 4a21bcf30..3fa1abf73 100644 --- a/.github/workflows/psalm-matrix.yml +++ b/.github/workflows/psalm-matrix.yml @@ -31,7 +31,7 @@ jobs: - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 - name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml diff --git a/.github/workflows/rector-apply.yml b/.github/workflows/rector-apply.yml index e53200fd9..ed06dec83 100644 --- a/.github/workflows/rector-apply.yml +++ b/.github/workflows/rector-apply.yml @@ -33,7 +33,7 @@ jobs: - name: Get php version id: versions - uses: icewind1991/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 + uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3 - name: Set up php${{ steps.versions.outputs.php-min }} uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 diff --git a/.github/workflows/sync-workflow-templates.yml b/.github/workflows/sync-workflow-templates.yml index e7094c713..4f5296937 100644 --- a/.github/workflows/sync-workflow-templates.yml +++ b/.github/workflows/sync-workflow-templates.yml @@ -26,7 +26,10 @@ jobs: matrix: branches: - ${{ github.event.repository.default_branch }} - - 'stable5.3' + - 'stable35' + - 'stable34' + - 'stable33' + - 'stable32' name: Update workflows in ${{ matrix.branches }}