Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions .github/actions-lock.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
25fc4c7e69e778e20bdc9eb0cc96367e block-merge-freeze.yml
acad44f3e99b665897766ce90374dd03 block-merge-freeze.yml
7f15fef2fde87aae0eb8386ded489372 command-compile.yml
48ba45e4c969523e6d7ae51cd6c4c6ba documentation.yml
985f3ac7d51405c1601c742832a14120 lint-eslint.yml
dc0ae733f35c60274937c2647c027d46 lint-eslint.yml
4b40dd0073e16f74dd04e6d49dcc043d lint-php-cs.yml
cfb31e47b6e9ab65e76c89b028754a4e lint-php.yml
97773e8d73758d9f1af50f7c8b82aef3 lint-typescript.yml
3b1f38e378f8e764b0b3c560a8cfe1cd node-test.yml
c5147997c7fb8ecbcd23c69705bddc86 lint-typescript.yml
d5f511793e785e83842609afc0317b24 node-test.yml
03759c9dc0fa748cb927b9f9cadf2925 node.yml
8fab08ac7da700ee304af0bf3c18b3a3 phpunit-mysql.yml
bbe9834ddb89207caf5e19d79ebb3672 phpunit-oci.yml
256bf1dead4ef8479e9ce7433f871548 phpunit-pgsql.yml
4ca2c2c4b1a73182667bab908e57c185 phpunit-sqlite.yml
6d20bb9054bf13310aaa1bf98025b3d9 phpunit-mysql.yml
a9366230d0b876662fb0ab124ba586af phpunit-oci.yml
33e50146debe0922d4e176f22d949aa1 phpunit-pgsql.yml
869cf6703da576578e5d1774aa87d837 phpunit-sqlite.yml
d1821b8a816578070ed8fd018f321f6d pr-feedback.yml
6dc046dfbca5dc65d938265c518fcac4 psalm.yml
f1cca476c953f28e3eec6c11b5866634 rector-apply.yml
6aa9eaa284ed1800168c96b97e90d582 rector-apply.yml
2dbec18233063b42f4d8e03bbb43671c reuse.yml
94c65e30a77686c079c6dfa54a008440 sync-workflow-templates.yml
b47a9fe981a7435caea92db33f5ad121 sync-workflow-templates.yml
a3440826636c0fd7c2d20b1de50363da update-nextcloud-ocp-approve-merge.yml
f5632e6d28c6afca9d4d46131fb48d57 update-nextcloud-ocp.yml
28dcf55e283b85c292fea0d0b2a15a8a npm-build.yml
1919e2ff468e875aeeae5fd088d4ce1f update-nextcloud-ocp.yml
ab958fa2b07234fceab6b6d836fb7f19 npm-build.yml
bea8a43904976fa01f1e091046541b37 release-relay.yml
0d4a72e82e345087f423a23cd06ab28c playwright.yml
2 changes: 1 addition & 1 deletion .github/workflows/block-merge-freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ jobs:

- name: Run check
if: ${{ env.server_ref != '' }}
run: cat version.php | grep 'OC_VersionString' | grep -i -v 'RC'
run: cat version.php | grep 'OC_VersionString' | grep -i -v -E '(\.0\.0 RC[3-9]|\.[1-9][0-9]* RC)'
2 changes: 1 addition & 1 deletion .github/workflows/lint-eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-oci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
src: ${{ steps.changes.outputs.src }}

steps:
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
src: ${{ steps.changes.outputs.src }}

steps:
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
Expand Down
234 changes: 182 additions & 52 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,197 @@
# 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: [master]
branches:
- master
- stable35
- stable34
- stable33

permissions:
contents: read

concurrency:
group: playwright-${{ github.head_ref || github.run_id }}
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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
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: '^22'
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.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
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
4 changes: 0 additions & 4 deletions .github/workflows/rector-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Remove nextcloud/ocp
run: |
composer remove nextcloud/ocp --dev --no-scripts

- name: Install composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sync-workflow-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
matrix:
branches:
- ${{ github.event.repository.default_branch }}
- 'stable35'
- 'stable34'
- 'stable33'
- 'stable32'
Expand Down
Loading