From d0246a919e5d9badccab99a6cb8481f71327343a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Mon, 19 Oct 2026 20:34:49 +0200 Subject: [PATCH] Run PHPUnit on garm7 --- .github/workflows/ai-policy.yml | 178 ---------- .github/workflows/autocheckers.yml | 123 ------- .github/workflows/bug-report-labeler.yml | 45 --- .github/workflows/codeql.yml | 49 --- .github/workflows/command-compile.yml | 235 ------------- .github/workflows/command-pull-3rdparty.yml | 111 ------ .../workflows/dependabot-approve-merge.yml | 99 ------ .github/workflows/files-external.yml | 248 ------------- .github/workflows/fixup.yml | 36 -- .github/workflows/integration-dav.yml | 129 ------- .github/workflows/integration-litmus.yml | 116 ------ .github/workflows/integration-s3-primary.yml | 82 ----- .github/workflows/integration-sqlite.yml | 191 ---------- .github/workflows/lint-eslint.yml | 100 ------ .github/workflows/lint-php-cs.yml | 88 ----- .github/workflows/lint-php.yml | 86 ----- .github/workflows/lint-stylelint.yml | 96 ----- .github/workflows/node-dist-unchanged.yml | 28 -- .github/workflows/node-test.yml | 106 ------ .github/workflows/npm-audit-fix.yml | 85 ----- .github/workflows/npm-build.yml | 114 ------ .github/workflows/object-storage.yml | 115 ------ .github/workflows/openapi.yml | 48 --- .github/workflows/performance.yml | 124 ------- .github/workflows/phpunit-32bits.yml | 2 +- .github/workflows/phpunit-kvstore.yml | 2 +- .github/workflows/phpunit-mariadb.yml | 2 +- .github/workflows/phpunit-memcached.yml | 2 +- .github/workflows/phpunit-mysql-sharding.yml | 2 +- .github/workflows/phpunit-mysql.yml | 2 +- .github/workflows/phpunit-nodb.yml | 2 +- .../phpunit-object-store-primary.yml | 2 +- .github/workflows/phpunit-oci.yml | 2 +- .github/workflows/phpunit-pgsql.yml | 2 +- .github/workflows/phpunit-sqlite.yml | 2 +- .github/workflows/playwright.yml | 331 ------------------ .github/workflows/pr-feedback.yml | 55 --- .github/workflows/rector-apply.yml | 65 ---- .github/workflows/rector.yml | 83 ----- .github/workflows/reuse.yml | 27 -- .github/workflows/stale.yml | 57 --- .github/workflows/static-code-analysis.yml | 243 ------------- .github/workflows/storage.yml | 98 ------ .github/workflows/update-cacert-bundle.yml | 64 ---- .github/workflows/update-code-signing-crl.yml | 71 ---- .../update-min-supported-desktop.yml | 128 ------- .github/workflows/update-node-dist.yml | 85 ----- .github/workflows/update-stable-titles.yml | 69 ---- 48 files changed, 11 insertions(+), 4019 deletions(-) delete mode 100644 .github/workflows/ai-policy.yml delete mode 100644 .github/workflows/autocheckers.yml delete mode 100644 .github/workflows/bug-report-labeler.yml delete mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/command-compile.yml delete mode 100644 .github/workflows/command-pull-3rdparty.yml delete mode 100644 .github/workflows/dependabot-approve-merge.yml delete mode 100644 .github/workflows/files-external.yml delete mode 100644 .github/workflows/fixup.yml delete mode 100644 .github/workflows/integration-dav.yml delete mode 100644 .github/workflows/integration-litmus.yml delete mode 100644 .github/workflows/integration-s3-primary.yml delete mode 100644 .github/workflows/integration-sqlite.yml delete mode 100644 .github/workflows/lint-eslint.yml delete mode 100644 .github/workflows/lint-php-cs.yml delete mode 100644 .github/workflows/lint-php.yml delete mode 100644 .github/workflows/lint-stylelint.yml delete mode 100644 .github/workflows/node-dist-unchanged.yml delete mode 100644 .github/workflows/node-test.yml delete mode 100644 .github/workflows/npm-audit-fix.yml delete mode 100644 .github/workflows/npm-build.yml delete mode 100644 .github/workflows/object-storage.yml delete mode 100644 .github/workflows/openapi.yml delete mode 100644 .github/workflows/performance.yml delete mode 100644 .github/workflows/playwright.yml delete mode 100644 .github/workflows/pr-feedback.yml delete mode 100644 .github/workflows/rector-apply.yml delete mode 100644 .github/workflows/rector.yml delete mode 100644 .github/workflows/reuse.yml delete mode 100644 .github/workflows/stale.yml delete mode 100644 .github/workflows/static-code-analysis.yml delete mode 100644 .github/workflows/storage.yml delete mode 100644 .github/workflows/update-cacert-bundle.yml delete mode 100644 .github/workflows/update-code-signing-crl.yml delete mode 100644 .github/workflows/update-min-supported-desktop.yml delete mode 100644 .github/workflows/update-node-dist.yml delete mode 100644 .github/workflows/update-stable-titles.yml diff --git a/.github/workflows/ai-policy.yml b/.github/workflows/ai-policy.yml deleted file mode 100644 index 4b4653ee67acd..0000000000000 --- a/.github/workflows/ai-policy.yml +++ /dev/null @@ -1,178 +0,0 @@ -# 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 - -name: AI Policy - -on: - pull_request: - types: [opened, synchronize, reopened] - branches: [master, main] - -permissions: - contents: read - # Required to add the "AI assisted" label via `gh pr edit --add-label` - pull-requests: write - # Required to create the "AI assisted" label via the REST labels endpoint - # (labels are an issues-scoped resource in the GitHub API) - issues: write - -concurrency: - group: ai-policy-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - check-ai-trailers: - runs-on: ubuntu-latest-low - steps: - - name: Collect PR commit messages - id: collect - env: - # Fall back to the default token when the PAT is unavailable - # (e.g. Dependabot- or fork-triggered runs don't receive Actions secrets) - GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT || github.token }} - COMMITS_URL: ${{ github.event.pull_request.commits_url }} - run: | - set -euo pipefail - gh api ${COMMITS_URL} | jq -r '.[] | .commit.message' > /tmp/pr_commits.txt - echo "--- PR commit messages ---" - cat /tmp/pr_commits.txt - echo "--------------------------" - - - name: Define shared agent detection patterns - run: | - set -euo pipefail - - # Email addresses known to be used by coding agents. - # These should never appear in Signed-off-by because the DCO can only be attested by a human. - EMAIL_PATTERN="copilot@github\.com\ - |noreply@anthropic\.com\ - |devin@cognition\.ai\ - |devin@cognition-labs\.com\ - |aider@aider\.chat\ - |noreply@aider\.chat\ - |codex@openai\.com\ - |cursor@anysphere\.com\ - |windsurf@codeium\.com\ - |codeium@codeium\.com\ - |amazon-q@amazon\.com\ - |codewhisperer@amazon\.com\ - |gemini-code-assist@google\.com\ - |openhands@all-hands\.dev\ - |swe-agent@princeton\.edu" - - # Strip embedded whitespace (used above only for readability) - EMAIL_PATTERN=$(echo "$EMAIL_PATTERN" | tr -d ' \n') - echo "AGENT_EMAIL_PATTERN=${EMAIL_PATTERN}" >> "$GITHUB_ENV" - - # Display-name prefixes used by known coding agents (shared by Signed-off-by and Co-Authored-By checks) - # shellcheck disable=SC2016 - echo 'AGENT_NAMES=GitHub Copilot|Claude( [A-Za-z0-9. -]+)?|Devin( AI)?|aider( \(.*\))?|OpenAI Codex|Cursor( AI)?|Windsurf|Amazon Q|CodeWhisperer|Gemini Code Assist|OpenHands|SWE-agent|AutoCodeRover|Tabnine' >> "$GITHUB_ENV" - - - name: Check for AI-assistant / Assisted-by trailers - id: ai_trailers - run: | - set -euo pipefail - AI_ASSISTED=false - if grep -qiE '^(AI-assistant|Assisted-by|AI-Assisted-By):' /tmp/pr_commits.txt; then - AI_ASSISTED=true - echo "Found AI-assistant/Assisted-by/AI-Assisted-By trailer(s):" - grep -iE '^(AI-assistant|Assisted-by|AI-Assisted-By):' /tmp/pr_commits.txt - fi - echo "ai_assisted=${AI_ASSISTED}" >> "$GITHUB_OUTPUT" - - - name: Check for coding-agent Signed-off-by trailers - id: agent_signoff - run: | - set -euo pipefail - - EMAIL_HITS=$(grep -iE "^Signed-off-by:.*<(${AGENT_EMAIL_PATTERN})>" /tmp/pr_commits.txt 2>/dev/null || true) - NAME_HITS=$(grep -iE "^Signed-off-by: *(${AGENT_NAMES}) *[<(]" /tmp/pr_commits.txt 2>/dev/null || true) - - AGENT_LINES=$(printf '%s\n%s' "$EMAIL_HITS" "$NAME_HITS" | sort -u | sed '/^[[:space:]]*$/d') - - AGENT_SIGNOFF=false - if [ -n "$AGENT_LINES" ]; then - AGENT_SIGNOFF=true - fi - - echo "agent_signoff=${AGENT_SIGNOFF}" >> "$GITHUB_OUTPUT" - { - echo "agent_lines<> "$GITHUB_OUTPUT" - - - name: Check for coding-agent Co-Authored-By trailers - id: co_authored - run: | - set -euo pipefail - - EMAIL_HITS=$(grep -iE "^Co-Authored-By:.*<(${AGENT_EMAIL_PATTERN})>" /tmp/pr_commits.txt 2>/dev/null || true) - NAME_HITS=$(grep -iE "^Co-Authored-By: *(${AGENT_NAMES}) *[<(]" /tmp/pr_commits.txt 2>/dev/null || true) - - CO_AUTHORED=false - if [ -n "$EMAIL_HITS" ] || [ -n "$NAME_HITS" ]; then - CO_AUTHORED=true - echo "Found coding-agent Co-Authored-By trailer(s):" - printf '%s\n%s' "$EMAIL_HITS" "$NAME_HITS" | sort -u | sed '/^[[:space:]]*$/d' - fi - - echo "co_authored=${CO_AUTHORED}" >> "$GITHUB_OUTPUT" - - - name: Create 'AI assisted' label if absent - if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true' - env: - # Fall back to the default token when the PAT is unavailable - # (e.g. Dependabot- or fork-triggered runs don't receive Actions secrets) - GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT || github.token }} - run: | - gh api "repos/${{ github.repository }}/labels" \ - --method POST \ - -f name="AI assisted" \ - -f color="d93f0b" \ - -f description="This PR contains AI-assisted commits" \ - 2>/dev/null || true - - - name: Label PR as AI assisted - if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true' - env: - # Fall back to the default token when the PAT is unavailable - # (e.g. Dependabot- or fork-triggered runs don't receive Actions secrets) - GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT || github.token }} - run: | - gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" \ - --method POST \ - -f "labels[]=AI assisted" - echo "Added 'AI assisted' label to PR #${{ github.event.pull_request.number }}" - - - name: Fail on coding-agent Signed-off-by - if: steps.agent_signoff.outputs.agent_signoff == 'true' - env: - AGENT_LINES: ${{ steps.agent_signoff.outputs.agent_lines }} - AGENTS_MD_URL: https://github.com/${{ github.repository }}/blob/${{ github.base_ref }}/AGENTS.md - run: | - echo "::error title=Coding-agent sign-off detected::A Signed-off-by trailer from a known coding agent was found in one or more commits." - echo "" - echo "Offending trailer(s):" - echo "${AGENT_LINES}" - echo "" - echo "The 'Signed-off-by' trailer represents the Developer Certificate of Origin (DCO)" - echo "and must only be attested by a human contributor." - echo "Please amend the affected commit(s) to remove the coding-agent sign-off" - echo "and replace it with an 'Assisted-by' trailer, for example:" - echo "" - echo " Assisted-by: Claude Code:claude-sonnet-4-6" - echo "" - echo "References:" - echo " • AGENTS.md (this repository)" - echo " ${AGENTS_MD_URL}" - echo " • AI Contribution Policy" - echo " https://github.com/nextcloud/.github/blob/master/AI_POLICY.md" - echo " • Contribution Guidelines" - echo " https://github.com/nextcloud/.github/blob/master/CONTRIBUTING.md" - exit 1 diff --git a/.github/workflows/autocheckers.yml b/.github/workflows/autocheckers.yml deleted file mode 100644 index 1fccea944bc1d..0000000000000 --- a/.github/workflows/autocheckers.yml +++ /dev/null @@ -1,123 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: Code checkers - -on: - pull_request: - -permissions: - contents: read - -concurrency: - group: autocheckers-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest-low - - outputs: - src: ${{ steps.changes.outputs.src }} - - steps: - - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/appinfo/**' - - '**/lib/**' - - '**/templates/**' - - 'vendor/**' - - 'vendor-bin/**' - - 'composer.json' - - 'composer.lock' - - '**.php' - - build/autoloaderchecker.sh - - autoloader: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - name: PHP checkers - - steps: - - name: Checkout server - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - submodules: true - - - name: Set up php - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - with: - php-version: '8.3' - 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 - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Check auto loaders - run: bash ./build/autoloaderchecker.sh - - autocheckers: - runs-on: ubuntu-latest-low - - needs: changes - if: needs.changes.outputs.src != 'false' - - name: Translation and Files checkers - - steps: - - name: Checkout server - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - submodules: true - - - name: Set up php - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - with: - php-version: '8.3' - 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 - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Check translations are JSON decodeable - run: php ./build/translation-checker.php - - - name: Check translations do not contain triple dot but ellipsis - run: php ./build/triple-dot-checker.php - - - name: Check .htaccess does not contain invalid changes - run: php ./build/htaccess-checker.php - - - name: Check that all and only expected files are included - run: php ./build/files-checker.php - - - name: Check that all shipped apps are linted by psalm - run: sh ./build/psalm-checker.sh - - summary: - permissions: - contents: none - runs-on: ubuntu-latest-low - needs: [changes, autoloader, autocheckers] - - if: always() - - name: autocheckers-summary - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && (needs.autocheckers.result != 'success' || needs.autoloader.result != 'success') }}; then exit 1; fi diff --git a/.github/workflows/bug-report-labeler.yml b/.github/workflows/bug-report-labeler.yml deleted file mode 100644 index 369f95b7947fa..0000000000000 --- a/.github/workflows/bug-report-labeler.yml +++ /dev/null @@ -1,45 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: AGPL-3.0-or-later - -name: Auto-label bug reports -on: - issues: - types: [opened] - -jobs: - add-version-label: - if: contains(github.event.issue.title, '[Bug]') - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - name: Extract version number and apply label - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - with: - script: | - const body = context.payload.issue.body || ''; - const normalizedBody = body.replace(/\r\n?/g, '\n'); - let label = ''; - - // Extract Nextcloud Server version number from a block like: - // ### Nextcloud Server version - // 32 - const versionMatch = normalizedBody.match(/### Nextcloud Server version\s*\n+([0-9]{1,3})\b/); - let nextcloudVersion = null; - if (versionMatch) { - nextcloudVersion = parseInt(versionMatch[1], 10); - label = nextcloudVersion + '-feedback'; - } - - if (label) { - try { - await github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: [label] - }); - } catch (error) { - core.setFailed(`Failed to add label "${label}": ${error.message || error}`); - } - } diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index ce4badb79d450..0000000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,49 +0,0 @@ -# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: AGPL-3.0-or-later - -name: "CodeQL Advanced" - -on: - push: - branches: [ "master", "stable*" ] - pull_request: - branches: [ "master", "stable*" ] - schedule: - - cron: '28 18 * * 1' - -jobs: - analyze: - name: Analyze (${{ matrix.language }}) - runs-on: ubuntu-latest - permissions: - # required for all workflows - security-events: write - - # required to fetch internal or private CodeQL packs - packages: read - - strategy: - fail-fast: false - matrix: - include: - - language: actions - build-mode: none - - language: javascript-typescript - build-mode: none - steps: - - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Initialize CodeQL - uses: github/codeql-action/init@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4.38.1 - with: - languages: ${{ matrix.language }} - build-mode: ${{ matrix.build-mode }} - config-file: ./.github/codeql-config.yml - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4.38.1 - with: - category: "/language:${{matrix.language}}" diff --git a/.github/workflows/command-compile.yml b/.github/workflows/command-compile.yml deleted file mode 100644 index 3b33c04ada2db..0000000000000 --- a/.github/workflows/command-compile.yml +++ /dev/null @@ -1,235 +0,0 @@ -# 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: 2021-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Compile Command -on: - issue_comment: - types: [created] - -permissions: - contents: read - -jobs: - init: - runs-on: ubuntu-latest-low - - # On pull requests and if the comment starts with `/compile` - if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/compile') - - outputs: - git_path: ${{ steps.git-path.outputs.path }} - arg1: ${{ steps.command.outputs.arg1 }} - arg2: ${{ steps.command.outputs.arg2 }} - head_ref: ${{ steps.comment-branch.outputs.head_ref }} - base_ref: ${{ steps.comment-branch.outputs.base_ref }} - - steps: - - name: Get repository from pull request comment - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - id: get-repository - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const pull = await github.rest.pulls.get({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number - }); - - const repositoryName = pull.data.head?.repo?.full_name - console.log(repositoryName) - return repositoryName - - - name: Disabled on forks - if: ${{ fromJSON(steps.get-repository.outputs.result) != github.repository }} - run: | - echo 'Can not execute /compile on forks' - exit 1 - - - name: Check actor permission - uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0 - with: - require: write - - - name: Add reaction on start - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - repository: ${{ github.event.repository.full_name }} - comment-id: ${{ github.event.comment.id }} - reactions: '+1' - - - name: Parse command - uses: skjnldsv/parse-command-comment@5c955203c52424151e6d0e58fb9de8a9f6a605a1 # v3.1 - id: command - - # Init path depending on which command is run - - name: Init path - id: git-path - run: | - if ${{ startsWith(steps.command.outputs.arg1, '/') }}; then - echo "path=${{steps.command.outputs.arg1}}" >> $GITHUB_OUTPUT - else - echo "path=${{steps.command.outputs.arg2}}" >> $GITHUB_OUTPUT - fi - - - name: Init branch - uses: xt0rted/pull-request-comment-branch@e8b8daa837e8ea7331c0003c9c316a64c6d8b0b1 # v3.0.0 - id: comment-branch - - - name: Add reaction on failure - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 - if: failure() - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - repository: ${{ github.event.repository.full_name }} - comment-id: ${{ github.event.comment.id }} - reactions: '-1' - - process: - runs-on: ubuntu-latest - needs: init - - steps: - - name: Restore cached git repository - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - with: - path: .git - key: git-repo - - - name: Checkout ${{ needs.init.outputs.head_ref }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - token: ${{ secrets.COMMAND_BOT_PAT }} - fetch-depth: 0 - ref: ${{ needs.init.outputs.head_ref }} - - - name: Setup git - run: | - git config --local user.email 'nextcloud-command@users.noreply.github.com' - git config --local user.name 'nextcloud-command' - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 - id: package-engines-versions - with: - fallbackNode: '^24' - fallbackNpm: '^11.3' - - - name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }} - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 - with: - node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }} - cache: npm - - - name: Set up npm ${{ steps.package-engines-versions.outputs.npmVersion }} - run: npm i -g 'npm@${{ steps.package-engines-versions.outputs.npmVersion }}' - - - name: Rebase to ${{ needs.init.outputs.base_ref }} - if: ${{ contains(needs.init.outputs.arg1, 'rebase') }} - env: - BASE_REF: ${{ needs.init.outputs.base_ref }} - run: | - git fetch origin "${BASE_REF}:${BASE_REF}" - - # Start the rebase - git rebase "origin/${BASE_REF}" || { - # Handle rebase conflicts in a loop - while [ -d .git/rebase-merge ] || [ -d .git/rebase-apply ]; do - echo "Handling rebase conflict..." - - # Remove and checkout /dist and /js folders from the base branch - if [ -d "dist" ]; then - rm -rf dist - git checkout "origin/${BASE_REF}" -- dist/ 2>/dev/null || echo "No dist folder in base branch" - fi - if [ -d "js" ]; then - rm -rf js - git checkout "origin/${BASE_REF}" -- js/ 2>/dev/null || echo "No js folder in base branch" - fi - - # Stage all changes - git add . - - # Check if there are any changes after resolving conflicts - if git diff --cached --quiet; then - echo "No changes after conflict resolution, skipping commit" - git rebase --skip - else - echo "Changes found, continuing rebase without editing commit message" - git -c core.editor=true rebase --continue - fi - - # Break if rebase is complete - if [ ! -d .git/rebase-merge ] && [ ! -d .git/rebase-apply ]; then - break - fi - done - } - - - name: Install dependencies & build - env: - CYPRESS_INSTALL_BINARY: 0 - PUPPETEER_SKIP_DOWNLOAD: true - run: | - npm ci - npm run build --if-present - - - name: Commit default - if: ${{ !contains(needs.init.outputs.arg1, 'fixup') && !contains(needs.init.outputs.arg1, 'amend') }} - env: - GIT_PATH: ${{ needs.init.outputs.git_path }} - run: | - git add "${GITHUB_WORKSPACE}${GIT_PATH}" - git commit --signoff -m 'chore(assets): Recompile assets' - - - name: Commit fixup - if: ${{ contains(needs.init.outputs.arg1, 'fixup') }} - env: - GIT_PATH: ${{ needs.init.outputs.git_path }} - run: | - git add "${GITHUB_WORKSPACE}${GIT_PATH}" - git commit --fixup=HEAD --signoff - - - name: Commit amend - if: ${{ contains(needs.init.outputs.arg1, 'amend') }} - env: - GIT_PATH: ${{ needs.init.outputs.git_path }} - run: | - git add "${GITHUB_WORKSPACE}${GIT_PATH}" - git commit --amend --no-edit --signoff - # Remove any [skip ci] from the amended commit - git commit --amend -m "$(git log -1 --format='%B' | sed '/\[skip ci\]/d')" - - - name: Push normally - if: ${{ !contains(needs.init.outputs.arg1, 'rebase') && !contains(needs.init.outputs.arg1, 'amend') }} - env: - HEAD_REF: ${{ needs.init.outputs.head_ref }} - BOT_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env] - run: | - git remote set-url origin "https://x-access-token:${BOT_TOKEN}@github.com/${{ github.repository }}.git" - git push origin "$HEAD_REF" - - - name: Force push - if: ${{ contains(needs.init.outputs.arg1, 'rebase') || contains(needs.init.outputs.arg1, 'amend') }} - env: - HEAD_REF: ${{ needs.init.outputs.head_ref }} - BOT_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env] - run: | - git remote set-url origin "https://x-access-token:${BOT_TOKEN}@github.com/${{ github.repository }}.git" - git push --force-with-lease origin "$HEAD_REF" - - - name: Add reaction on failure - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 - if: failure() - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - repository: ${{ github.event.repository.full_name }} - comment-id: ${{ github.event.comment.id }} - reactions: '-1' diff --git a/.github/workflows/command-pull-3rdparty.yml b/.github/workflows/command-pull-3rdparty.yml deleted file mode 100644 index 0240c3f8c824e..0000000000000 --- a/.github/workflows/command-pull-3rdparty.yml +++ /dev/null @@ -1,111 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: Update 3rdparty command - -on: - issue_comment: - types: created - -permissions: - contents: read - -jobs: - rebase: - runs-on: ubuntu-latest - permissions: - contents: none - pull-requests: read - - # On pull requests and if the comment starts with `/update-3rdparty` - if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/update-3rdparty') - - steps: - - name: Add reaction on start - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - repository: ${{ github.event.repository.full_name }} - comment-id: ${{ github.event.comment.id }} - reactions: '+1' - - # issue_comment events carry no pull_request context in their payload, so we - # must fetch the PR via the API. This also gives us base.ref for free, avoiding - # a second API call. The GITHUB_TOKEN needs pull-requests:read (granted above). - - name: Get pull request metadata - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - id: get-pr - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const pull = await github.rest.pulls.get({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number, - }); - core.setOutput('head_repo', pull.data.head.repo?.full_name ?? ''); - core.setOutput('base_ref', pull.data.base.ref); - - - name: Disabled on forks - if: steps.get-pr.outputs.head_repo != github.repository - run: | - echo 'Can not execute /update-3rdparty on forks' - exit 1 - - - name: Init branch - uses: xt0rted/pull-request-comment-branch@e8b8daa837e8ea7331c0003c9c316a64c6d8b0b1 # v3.0.0 - id: comment-branch - - - name: Checkout ${{ steps.comment-branch.outputs.head_ref }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - fetch-depth: 0 - token: ${{ secrets.COMMAND_BOT_PAT }} - ref: ${{ steps.comment-branch.outputs.head_ref }} - - - name: Register server reference to fallback to master branch - run: | - base_ref="${{ steps.get-pr.outputs.base_ref }}" - if [[ "$base_ref" == "main" || "$base_ref" == "master" ]]; then - echo "server_ref=master" >> "$GITHUB_ENV" - echo "Setting server_ref to master" - elif [[ "$base_ref" =~ ^stable[0-9]+$ ]]; then - echo "server_ref=$base_ref" >> "$GITHUB_ENV" - echo "Setting server_ref to $base_ref" - else - echo "Not based on master/main/stable*, so skipping pull 3rdparty command" - fi - - - name: Setup git - run: | - git config --local user.email 'nextcloud-command@users.noreply.github.com' - git config --local user.name 'nextcloud-command' - - - name: Add reaction on failure - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 - if: ${{ env.server_ref == '' }} - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - repository: ${{ github.event.repository.full_name }} - comment-id: ${{ github.event.comment.id }} - reactions: '-1' - - - name: Pull 3rdparty - if: ${{ env.server_ref != '' }} - run: git submodule foreach 'if [ "$sm_path" == "3rdparty" ]; then git pull origin '"'"'${{ env.server_ref }}'"'"'; fi' - - - name: Commit and push changes - if: ${{ env.server_ref != '' }} - run: | - git add 3rdparty - git commit -s -m 'Update submodule 3rdparty to latest ${{ env.server_ref }}' - git push - - - name: Add reaction on failure - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 - if: failure() - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - repository: ${{ github.event.repository.full_name }} - comment-id: ${{ github.event.comment.id }} - reactions: '-1' diff --git a/.github/workflows/dependabot-approve-merge.yml b/.github/workflows/dependabot-approve-merge.yml deleted file mode 100644 index 89e0ede219246..0000000000000 --- a/.github/workflows/dependabot-approve-merge.yml +++ /dev/null @@ -1,99 +0,0 @@ -# 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: Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Auto approve Dependabot PRs - -on: - pull_request_target: # zizmor: ignore[dangerous-triggers] - branches: - - main - - master - - stable* - -permissions: - contents: read - -concurrency: - group: dependabot-approve-merge-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -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 - - steps: - - name: Disabled on forks - if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} - run: | - echo 'Can not approve PRs from forks' - exit 1 - - - uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0 - id: branchname - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - 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: 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 }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # Enable GitHub auto merge - - name: Auto merge - uses: alexwilson/enable-github-automerge-action@2c32e18a76e0726ffe7a573bfff2d42a20885126 # 3.0.0 - 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.DEPENDABOT_AUTOMERGE_TOKEN }} diff --git a/.github/workflows/files-external.yml b/.github/workflows/files-external.yml deleted file mode 100644 index 7cd2527f8bf43..0000000000000 --- a/.github/workflows/files-external.yml +++ /dev/null @@ -1,248 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: PHPUnit files_external -on: - workflow_call: - -permissions: - contents: read - -jobs: - files-external: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - strategy: - fail-fast: false - matrix: - php-versions: ['8.3', '8.5'] - backend: ['generic', 'proftpd', 'vsftpd', 'pure-ftpd', 's3-minio', 's3-localstack', 'openssh', 'smb', 'webdav'] - - name: php${{ matrix.php-versions }}-${{ matrix.backend }} - - steps: - - name: Checkout server - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - submodules: true - - # Storage backends run as plain containers instead of job services so that a - # single matrix job can pick the one it needs. - - name: Start storage backend - env: - BACKEND: ${{ matrix.backend }} - run: | - case "$BACKEND" in - proftpd|vsftpd|pure-ftpd) - sudo mkdir /tmp/ftp - sudo chmod -R 0777 /tmp/ftp - ;; - esac - - case "$BACKEND" in - proftpd) - echo '$6$Q7V2n3q2GRVv5YeQ$/AhLu07H76Asojy7bxGXMY1caKLAbp5Vt82LOZYMkD/8uDzyMAEXwk0c1Bdz1DkBsk2Vh/9SF130mOPavRGMo.' > /tmp/secret.txt - echo 'FTP_ROOT=/home/test' >> $GITHUB_ENV - docker run --name ftp -d --net host -e PASV_ADDRESS=127.0.0.1 -e FTPUSER_NAME=test -v /tmp/secret.txt:/run/secrets/ftp-user-password-secret -v /tmp/ftp:/home/test instantlinux/proftpd - ;; - vsftpd) - docker run --name ftp -d --net host -e FTP_USER=test -e FTP_PASS=test -e PASV_ADDRESS=127.0.0.1 -v /tmp/ftp:/home/vsftpd/test fauria/vsftpd - ;; - pure-ftpd) - docker run --name ftp -d --net host -e PUBLICHOST=localhost -e FTP_USER_NAME=test -e FTP_USER_PASS=test -e FTP_USER_HOME=/home/test -v /tmp/ftp:/home/test -v /tmp/ftp:/etc/pure-ftpd/passwd stilliard/pure-ftpd - ;; - openssh) - sudo mkdir /tmp/sftp - sudo chmod -R 0777 /tmp/sftp - docker run --name sftp -d -p 2222:22 -v /tmp/sftp:/home/test atmoz/sftp 'test:test:::data' - ;; - s3-minio) - docker run --name minio -d -p 9000:9000 -e MINIO_ROOT_USER=nextcloud -e MINIO_ROOT_PASSWORD=bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ= -e MINIO_DEFAULT_BUCKETS=nextcloud bitnami/minio@sha256:50cec18ac4184af4671a78aedd5554942c8ae105d51a465fa82037949046da01 # v2025.4.22 - ;; - s3-localstack) - docker run --name localstack -d -p 4566:4566 -e SERVICES=s3 -e DEBUG=1 localstack/localstack@sha256:9d4253786e0effe974d77fe3c390358391a56090a4fff83b4600d8a64404d95d # v4.5.0 - ;; - smb) - docker run --name samba -d -p 445:445 -e ACCOUNT_test=test -e UID_test=1000 -e 'SAMBA_VOLUME_CONFIG_test=[public]; path=/tmp; valid users = test; guest ok = no; read only = no; browseable = yes' ghcr.io/servercontainers/samba:smbd-only-a3.18.0-s4.18.2-r0 - ;; - webdav) - docker run --name apache -d -p 8081:80 ghcr.io/nextcloud/continuous-integration-webdav-apache:latest - ;; - esac - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - 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, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite${{ matrix.backend == 'smb' && ', smbclient' || '' }} - coverage: none - ini-file: development - ini-values: disable_functions="" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up smbclient - # This is needed as icewind/smb php library for notify - if: ${{ matrix.backend == 'smb' }} - run: | - sudo apt-get update - sudo apt-get install -y smbclient - - - name: Set up Nextcloud - env: - BACKEND: ${{ matrix.backend }} - OBJECT_STORE_KEY: nextcloud - OBJECT_STORE_SECRET: bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ= - run: | - composer install - mkdir -p data - ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password - ./occ app:enable --force files_external - - case "$BACKEND" in - smb|webdav) - ./occ config:system:set --value true --type boolean allow_local_remote_servers - ;; - esac - - case "$BACKEND" in - generic) - echo 'TEST_ARGS=' >> $GITHUB_ENV - ;; - proftpd|vsftpd|pure-ftpd) - echo " true,'host' => 'localhost','user' => 'test','password' => 'test', 'root' => '$FTP_ROOT'];" > apps/files_external/tests/config.ftp.php - echo 'TEST_ARGS=apps/files_external/tests/Storage/FtpTest.php' >> $GITHUB_ENV - ;; - openssh) - echo " true, 'host' => 'localhost:2222','user' => 'test','password' => 'test', 'root' => 'data'];" > apps/files_external/tests/config.sftp.php - echo 'TEST_ARGS=apps/files_external/tests/Storage/SftpTest.php' >> $GITHUB_ENV - ;; - s3-minio) - echo " true, 'minio' => true, 'secret' => 'actually-not-secret', 'passwordsalt' => 'actually-not-secret', 'hostname' => 'localhost','key' => '$OBJECT_STORE_KEY','secret' => '$OBJECT_STORE_SECRET', 'bucket' => 'bucket', 'port' => 9000, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/files_external/tests/config.amazons3.php - echo 'TEST_ARGS=--group S3 apps/files_external/tests/Storage' >> $GITHUB_ENV - ;; - s3-localstack) - echo " true, 'localstack' => true, 'hostname' => 'localhost','key' => 'ignored','secret' => 'ignored', 'bucket' => 'bucket', 'port' => 4566, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/files_external/tests/config.amazons3.php - echo 'TEST_ARGS=--group S3 apps/files_external/tests/Storage' >> $GITHUB_ENV - ;; - smb) - echo "true, 'host'=>'localhost', 'user'=>'test', 'password'=>'test', 'root'=>'', 'share'=>'public'];" > apps/files_external/tests/config.smb.php - echo 'TEST_ARGS=apps/files_external/tests/Storage/SmbTest.php' >> $GITHUB_ENV - ;; - webdav) - echo " true, 'host' => 'localhost:8081/webdav/', 'user' => 'test', 'password'=>'pass', 'root' => '', 'wait' => 0];" > apps/files_external/tests/config.webdav.php - echo 'TEST_ARGS=apps/files_external/tests/Storage/WebdavTest.php' >> $GITHUB_ENV - ;; - esac - - - name: Wait for storage backend - env: - BACKEND: ${{ matrix.backend }} - run: | - case "$BACKEND" in - proftpd|vsftpd|pure-ftpd) - php -r "var_dump(file_put_contents('ftp://test:test@localhost$FTP_ROOT/ftp.txt', 'asd'));" - php -r "var_dump(file_get_contents('ftp://test:test@localhost$FTP_ROOT/ftp.txt'));" - php -r "var_dump(mkdir('ftp://test:test@localhost$FTP_ROOT/asdads'));" - ls -l /tmp/ftp - [ -f /tmp/ftp/ftp.txt ] - ;; - s3-minio) - curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready - ;; - smb) - apps/files_external/tests/env/wait-for-connection 127.0.0.1 445 60 - ;; - webdav) - sleep 5 - curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://test:pass@localhost:8081/webdav/ - ;; - esac - - - name: PHPUnit - run: composer run test:files_external -- --log-junit junit.xml $TEST_ARGS - - - name: Nextcloud logs - if: always() - run: | - if [ -f data/nextcloud.log ]; then cat data/nextcloud.log; fi - - - name: Storage backend logs - if: always() - run: | - docker ps -a - docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done - - files-external-smb-kerberos: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - name: smb-kerberos-sso - - steps: - - name: Checkout server - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - submodules: true - - - name: Checkout user_saml - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - repository: nextcloud/user_saml - path: apps/user_saml - - - name: Install user_saml - run: | - cd apps/user_saml - composer i - cd ../.. - - - name: Pull images - run: | - docker pull ghcr.io/icewind1991/samba-krb-test-dc - docker pull ghcr.io/icewind1991/samba-krb-test-apache-gssapi:8.4 - docker pull ghcr.io/icewind1991/samba-krb-test-client - docker tag ghcr.io/icewind1991/samba-krb-test-dc icewind1991/samba-krb-test-dc - docker tag ghcr.io/icewind1991/samba-krb-test-apache-gssapi:8.4 icewind1991/samba-krb-test-apache-gssapi - docker tag ghcr.io/icewind1991/samba-krb-test-client icewind1991/samba-krb-test-client - - - name: Setup AD-DC - run: | - DC_IP=$(apps/files_external/tests/sso-setup/start-dc.sh) - sleep 1 - apps/files_external/tests/sso-setup/start-apache.sh $DC_IP $PWD - echo "DC_IP=$DC_IP" >> $GITHUB_ENV - - - name: Set up Nextcloud - run: | - apps/files_external/tests/sso-setup/setup-sso-nc.sh - - - name: Test SSO - run: | - apps/files_external/tests/sso-setup/test-sso-smb.sh ${{ env.DC_IP }} - - - name: Show logs DC - if: always() - run: | - docker logs dc - echo "------------" - docker exec dc cat /var/log/samba/log.samba - - - name: Show logs Apache - if: always() - run: | - docker logs apache - - - name: Show logs - if: always() - run: | - FILEPATH=$(docker exec --user 33 apache ./occ log:file | grep "Log file:" | cut -d' ' -f3) - echo "$FILEPATH:" - docker exec --user 33 apache cat $FILEPATH diff --git a/.github/workflows/fixup.yml b/.github/workflows/fixup.yml deleted file mode 100644 index 69da2bbb039f2..0000000000000 --- a/.github/workflows/fixup.yml +++ /dev/null @@ -1,36 +0,0 @@ -# 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: 2021-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Block fixup and squash commits - -on: - pull_request: - types: [opened, ready_for_review, reopened, synchronize] - -permissions: - contents: read - -concurrency: - group: fixup-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - commit-message-check: - if: github.event.pull_request.draft == false - - permissions: - pull-requests: write - name: Block fixup and squash commits - - runs-on: ubuntu-latest-low - - steps: - - name: Run check - uses: skjnldsv/block-fixup-merge-action@c138ea99e45e186567b64cf065ce90f7158c236a # v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/integration-dav.yml b/.github/workflows/integration-dav.yml deleted file mode 100644 index d6a668cd42b67..0000000000000 --- a/.github/workflows/integration-dav.yml +++ /dev/null @@ -1,129 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: DAV integration tests -on: - pull_request: - -permissions: - contents: read - -concurrency: - group: integration-caldav-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest-low - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/*.php' - - '**/lib/**' - - '**/tests/**' - - '**/vendor-bin/**' - - 'build/integration/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - integration-caldav: - runs-on: ubuntu-latest - needs: changes - - if: needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh' - - strategy: - fail-fast: false - matrix: - php-versions: ['8.3', '8.5'] - endpoint: ['old', 'new'] - service: ['CalDAV', 'CardDAV'] - - name: ${{ matrix.service }} (${{ matrix.endpoint }} endpoint) php${{ matrix.php-versions }} - - steps: - - name: Checkout server - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - 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, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite - coverage: none - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Python - uses: LizardByte/actions/actions/setup_python@39c468549cfb87ccb917e5e5342e18abc926dc48 # v2026.909.30231 - with: - python-version: '2.7' - - - name: Set up CalDAVTester - run: | - git clone --depth=1 https://github.com/apple/ccs-caldavtester.git CalDAVTester - git clone --depth=1 https://github.com/apple/ccs-pycalendar.git pycalendar - - - name: Set up Nextcloud - run: | - mkdir data - ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin - # disable the trashbin, so recurrent deletion of the same object works - ./occ config:app:set dav calendarRetentionObligation --value=0 - # Prepare users - OC_PASS=user01 ./occ user:add --password-from-env user01 - OC_PASS=user02 ./occ user:add --password-from-env user02 - # Prepare calendars - ./occ dav:create-calendar user01 calendar - ./occ dav:create-calendar user01 shared - ./occ dav:create-calendar user02 calendar - # Prepare address books - ./occ dav:create-addressbook user01 addressbook - ./occ dav:create-addressbook user02 addressbook - - - name: Run Nextcloud - run: | - php -S localhost:8888 & - - - name: Run CalDAVTester - run: | - cp "apps/dav/tests/testsuits/caldavtest/serverinfo-${{ matrix.endpoint }}${{ matrix.endpoint == 'old' && (matrix.service == 'CardDAV' && '-carddav' || '-caldav') || '' }}-endpoint.xml" "apps/dav/tests/testsuits/caldavtest/serverinfo.xml" - pushd CalDAVTester - PYTHONPATH="../pycalendar/src" python testcaldav.py --print-details-onfail --basedir "../apps/dav/tests/testsuits/caldavtest" -o cdt.txt \ - "${{ matrix.service }}/current-user-principal.xml" \ - "${{ matrix.service }}/sync-report.xml" \ - ${{ matrix.endpoint == 'new' && format('{0}/sharing-{1}.xml', matrix.service, matrix.service == 'CalDAV' && 'calendars' || 'addressbooks') || ';' }} - popd - - - name: Print Nextcloud logs - if: always() - run: | - cat data/nextcloud.log - - caldav-integration-summary: - permissions: - contents: none - runs-on: ubuntu-latest-low - needs: [changes, integration-caldav] - - if: always() - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.integration-caldav.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/integration-litmus.yml b/.github/workflows/integration-litmus.yml deleted file mode 100644 index 23f43b314e82c..0000000000000 --- a/.github/workflows/integration-litmus.yml +++ /dev/null @@ -1,116 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: Litmus integration tests -on: - pull_request: - -permissions: - contents: read - -concurrency: - group: integration-litmus-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest-low - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/*.php' - - '**/lib/**' - - '**/tests/**' - - '**/vendor-bin/**' - - 'build/integration/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - integration-litmus: - runs-on: ubuntu-latest - needs: changes - - if: needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh' - - strategy: - fail-fast: false - matrix: - php-versions: ['8.3', '8.5'] - endpoint: ['webdav', 'dav'] - - name: Litmus WebDAV ${{ matrix.endpoint }} - - steps: - - name: Checkout server - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - 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, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite - coverage: none - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Nextcloud - run: | - mkdir data - ./occ maintenance:install \ - --verbose \ - --database=sqlite \ - --database-name=nextcloud \ - --database-user=root \ - --database-pass=rootpassword \ - --admin-user admin \ - --admin-pass admin - ./occ config:system:set trusted_domains 2 --value=host.docker.internal:8080 - - - name: Run Nextcloud - run: | - php -S 0.0.0.0:8080 & - - - name: Run Litmus test - run: | - docker run \ - --rm \ - --add-host=host.docker.internal:host-gateway \ - ghcr.io/nextcloud/continuous-integration-litmus-php8.3:latest \ - bash -c '\ - cd /tmp/litmus/litmus-0.13; - make URL=http://host.docker.internal:8080/remote.php/${{ matrix.endpoint }}${{ matrix.endpoint == 'dav' && '/files/admin' || ''}} CREDS="admin admin" TESTS="basic copymove props largefile" check; - status=$?; - cat debug.log; - exit $status;' - - - name: Print Nextcloud logs - if: always() - run: cat data/nextcloud.log - - integration-litmus-summary: - permissions: - contents: none - runs-on: ubuntu-latest-low - needs: [changes, integration-litmus] - - if: always() - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.integration-litmus.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/integration-s3-primary.yml b/.github/workflows/integration-s3-primary.yml deleted file mode 100644 index be896bbe25b25..0000000000000 --- a/.github/workflows/integration-s3-primary.yml +++ /dev/null @@ -1,82 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: S3 primary storage integration tests -on: - workflow_call: - -permissions: - contents: read - -jobs: - integration-s3-primary: - runs-on: ubuntu-latest - - if: github.repository_owner != 'nextcloud-gmbh' - - strategy: - fail-fast: false - matrix: - php-versions: ['8.3', '8.5'] - key: ['objectstore', 'objectstore_multibucket'] - - name: php${{ matrix.php-versions }}-${{ matrix.key }}-minio - - services: - redis: - image: ghcr.io/nextcloud/continuous-integration-redis:latest # zizmor: ignore[unpinned-images] - options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 - ports: - - 6379:6379/tcp - minio: - image: bitnami/minio@sha256:50cec18ac4184af4671a78aedd5554942c8ae105d51a465fa82037949046da01 # v2025.4.22 - env: - MINIO_ROOT_USER: nextcloud - MINIO_ROOT_PASSWORD: bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ= - MINIO_DEFAULT_BUCKETS: nextcloud - ports: - - "9000:9000" - - steps: - - name: Checkout server - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - 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, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite - coverage: none - ini-file: development - ini-values: disable_functions="" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Wait for S3 - run: | - curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready - - - name: Set up Nextcloud - run: | - composer install - mkdir data - echo ' ["class" => "OC\Files\ObjectStore\S3", "arguments" => ["bucket" => "nextcloud", "autocreate" => true, "key" => "nextcloud", "secret" => "bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ=", "hostname" => "localhost", "port" => 9000, "use_ssl" => false, "use_path_style" => true, "uploadPartSize" => 52428800]]];' > config/config.php - echo ' ["host" => "localhost", "port" => 6379], "memcache.local" => "\OC\Memcache\Redis", "memcache.distributed" => "\OC\Memcache\Redis"];' > config/redis.config.php - ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin - php -f index.php - - - name: Integration - run: | - cd build/integration - bash run.sh --tags "~@failure-s3" dav_features/webdav-related.feature - - - name: S3 logs - if: always() - run: | - cat data/nextcloud.log - docker ps -a - docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done diff --git a/.github/workflows/integration-sqlite.yml b/.github/workflows/integration-sqlite.yml deleted file mode 100644 index a73916d2be9a9..0000000000000 --- a/.github/workflows/integration-sqlite.yml +++ /dev/null @@ -1,191 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: Integration sqlite - -on: - pull_request: - -permissions: - contents: read - -concurrency: - group: integration-sqlite-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest-low - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/*.php' - - '**/lib/**' - - '**/tests/**' - - '**/vendor-bin/**' - - 'build/integration/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - 'core/shipped.json' - - integration-sqlite: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - strategy: - fail-fast: false - matrix: - test-suite: - - 'capabilities_features' - - 'collaboration_features' - - 'comments_features' - - '--tags ~@requires-s3 dav_features' - - 'encryption_features' - - 'features' - - 'federation_features' - - '--tags ~@large files_features' - - 'filesdrop_features' - - 'file_conversions' - - 'files_reminders' - - 'openldap_features' - - 'openldap_numerical_features' - - 'ldap_features' - - 'routing_features' - - 'setup_features' - - 'sharees_features' - - 'sharing_features' - - 'theming_features' - - 'videoverification_features' - - 'guests_features' - - php-versions: ['8.3', '8.5'] - guests-versions: ['main'] - spreed-versions: ['main'] - activity-versions: ['master'] - - services: - redis: - image: ghcr.io/nextcloud/continuous-integration-redis:latest # zizmor: ignore[unpinned-images] - options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 - ports: - - 6379:6379/tcp - openldap: - image: ghcr.io/nextcloud/continuous-integration-openldap:openldap-8 # zizmor: ignore[unpinned-images] - ports: - - 389:389 - - 636:636 - env: - SLAPD_DOMAIN: nextcloud.ci - SLAPD_ORGANIZATION: Nextcloud - SLAPD_PASSWORD: admin - SLAPD_ADDITIONAL_MODULES: memberof - - steps: - - name: Checkout server - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - submodules: true - - - name: Checkout Talk app - if: ${{ matrix.test-suite == 'videoverification_features' }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - repository: nextcloud/spreed - path: apps/spreed - ref: ${{ matrix.spreed-versions }} - - - name: Checkout Guests app - if: ${{ matrix.test-suite == 'guests_features' }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - repository: nextcloud/guests - path: apps/guests - ref: ${{ matrix.guests-versions }} - - - name: Checkout Activity app - if: ${{ matrix.test-suite == 'sharing_features' }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - repository: nextcloud/activity - path: apps/activity - ref: ${{ matrix.activity-versions }} - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - 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, imagick, intl, json, ldap, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite - coverage: none - ini-file: development - ini-values: disable_functions="" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up dependencies - run: | - composer install - - - name: Set up Talk dependencies - if: ${{ matrix.test-suite == 'videoverification_features' }} - working-directory: apps/spreed - run: composer i --no-dev - - - name: Set up Nextcloud - run: | - mkdir data - ./occ maintenance:install --verbose ${{ contains(matrix.test-suite,'ldap') && '--data-dir=/dev/shm/nc_int' || '' }} --database=sqlite --database-name=nextcloud --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin - NC_debug=true ./occ testing:prepare-ci - - - name: Configure caching - if: ${{ contains(matrix.test-suite,'ldap') }} - run: | - ./occ config:system:set redis host --value=localhost - ./occ config:system:set redis port --value=6379 --type=integer - ./occ config:system:set redis timeout --value=0 --type=integer - ./occ config:system:set memcache.local --value='\OC\Memcache\Redis' - ./occ config:system:set memcache.distributed --value='\OC\Memcache\Redis' - - - name: Run integration - working-directory: build/integration - env: - LDAP_HOST: localhost - run: bash run.sh ${{ matrix.test-suite }} no-tail-log - - - name: Print logs - if: always() - run: | - cat $(./occ log:file |grep "Log file"|cut -d" " -f3) - docker ps -a - docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done - - summary: - permissions: - contents: none - runs-on: ubuntu-latest-low - needs: [changes, integration-sqlite] - - if: always() - - name: integration-sqlite-summary - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.integration-sqlite.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml deleted file mode 100644 index 0603974617ef3..0000000000000 --- a/.github/workflows/lint-eslint.yml +++ /dev/null @@ -1,100 +0,0 @@ -# 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: 2021-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Lint eslint - -on: pull_request - -permissions: - contents: read - -concurrency: - group: lint-eslint-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest-low - permissions: - contents: read - pull-requests: read - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '**/src/**' - - '**/appinfo/info.xml' - - 'package.json' - - 'package-lock.json' - - 'tsconfig.json' - - '.eslintrc.*' - - '.eslintignore' - - '**.js' - - '**.ts' - - '**.vue' - - lint: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - name: NPM lint - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 - id: versions - with: - fallbackNode: '^24' - fallbackNpm: '^11.3' - - - 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 dependencies - env: - CYPRESS_INSTALL_BINARY: 0 - PUPPETEER_SKIP_DOWNLOAD: true - run: npm ci - - - name: Lint - run: npm run lint - - summary: - permissions: - contents: none - runs-on: ubuntu-latest-low - needs: [changes, lint] - - if: always() - - # This is the summary, we just avoid to rename it so that branch protection rules still match - name: eslint - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml deleted file mode 100644 index 9bc7c92ca7b83..0000000000000 --- a/.github/workflows/lint-php-cs.yml +++ /dev/null @@ -1,88 +0,0 @@ -# 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: 2021-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Lint php-cs - -on: pull_request - -permissions: - contents: read - -concurrency: - group: lint-php-cs-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest-low - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/lib/**' - - '**/tests/**' - - '**/vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - '**.php' - - lint: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - name: php-cs - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Set up php - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - with: - php-version: 8.3 - 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 - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Install dependencies - run: composer i - - - name: Lint - run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 ) - - summary: - permissions: - contents: none - runs-on: ubuntu-latest-low - needs: [changes, lint] - - if: always() - - # This is the summary, we just avoid to rename it so that branch protection rules still match - name: php-cs - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml deleted file mode 100644 index f406f3185440d..0000000000000 --- a/.github/workflows/lint-php.yml +++ /dev/null @@ -1,86 +0,0 @@ -# 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: 2021-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Lint php - -on: pull_request - -permissions: - contents: read - -concurrency: - group: lint-php-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest-low - outputs: - src: ${{ steps.changes.outputs.src}} - steps: - - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/lib/**' - - '**/tests/**' - - '**/vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - '**.php' - - lint: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - strategy: - matrix: - php-versions: ['8.3', '8.5'] - - name: php-lint - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - 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 - coverage: none - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Lint - run: composer run lint - - summary: - permissions: - contents: none - runs-on: ubuntu-latest-low - needs: [changes, lint] - - if: always() - - name: php-lint-summary - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/lint-stylelint.yml b/.github/workflows/lint-stylelint.yml deleted file mode 100644 index 9b654456a9c9c..0000000000000 --- a/.github/workflows/lint-stylelint.yml +++ /dev/null @@ -1,96 +0,0 @@ -# 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: 2021-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Lint stylelint - -on: pull_request - -permissions: - contents: read - -concurrency: - group: lint-stylelint-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest-low - permissions: - contents: read - pull-requests: read - - outputs: - src: ${{ steps.changes.outputs.src }} - - steps: - - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '**/src/**' - - '**/appinfo/info.xml' - - 'package.json' - - 'package-lock.json' - - '**.css' - - '**.scss' - - '**.vue' - - lint: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - name: stylelint - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 - id: versions - with: - fallbackNode: '^24' - fallbackNpm: '^11.3' - - - 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 dependencies - env: - CYPRESS_INSTALL_BINARY: 0 - run: npm ci - - - name: Lint - run: npm run stylelint - - summary: - permissions: - contents: none - runs-on: ubuntu-latest-low - needs: [changes, lint] - - if: always() - - # This is the summary, we just avoid to rename it so that branch protection rules still match - name: stylelint - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/node-dist-unchanged.yml b/.github/workflows/node-dist-unchanged.yml deleted file mode 100644 index 7787b153533bc..0000000000000 --- a/.github/workflows/node-dist-unchanged.yml +++ /dev/null @@ -1,28 +0,0 @@ -# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: AGPL-3.0-or-later - -name: Check node dist files - -on: - pull_request: - -jobs: - changed_files: - runs-on: ubuntu-latest-low - name: Check node dist files - permissions: - pull-requests: read - - steps: - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6 - with: - files: dist/** - - - name: Run step if any file(s) in the dist folder change - if: steps.changed-files.outputs.any_changed == 'true' - run: | - echo "One or more files in the dist folder has changed. Do NOT commit files in there as they will be generated automatically once a pull request is merged" - echo "List all the files that have changed: ${{ steps.changed-files.outputs.all_changed_files }}" - exit 1 diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml deleted file mode 100644 index c1b0cb42a8eb8..0000000000000 --- a/.github/workflows/node-test.yml +++ /dev/null @@ -1,106 +0,0 @@ -# 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: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Node tests - -on: - pull_request: - schedule: - - cron: "5 2 * * *" - -permissions: - contents: read - -concurrency: - group: node-tests-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest-low - permissions: - contents: read - pull-requests: read - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '**/__tests__/**' - - '**/__mocks__/**' - - 'apps/*/src/**' - - 'apps/*/appinfo/info.xml' - - 'core/src/**' - - 'package.json' - - '**/package-lock.json' - - 'tsconfig.json' - - '**.js' - - '**.ts' - - '**.vue' - - test: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 - id: versions - with: - fallbackNode: '^24' - fallbackNpm: '^11.3' - - - 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 dependencies - env: - CYPRESS_INSTALL_BINARY: 0 - run: | - npm ci - - - name: Test and process coverage - run: npm run test:coverage - - - name: Collect coverage - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 - with: - files: ./coverage/lcov.info,./coverage/legacy/lcov.info - - summary: - permissions: - contents: none - runs-on: ubuntu-latest-low - needs: [changes, test] - - if: always() - - name: node-test-summary - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/npm-audit-fix.yml b/.github/workflows/npm-audit-fix.yml deleted file mode 100644 index b382c55a86158..0000000000000 --- a/.github/workflows/npm-audit-fix.yml +++ /dev/null @@ -1,85 +0,0 @@ -# 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: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Npm audit fix and compile - -on: - workflow_dispatch: - schedule: - # At 2:30 on Sundays - - cron: '30 2 * * 0' - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - branches: - - ${{ github.event.repository.default_branch }} - - 'stable35' - - 'stable34' - - 'stable33' - - name: npm-audit-fix-${{ matrix.branches }} - - steps: - - name: Checkout - id: checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - ref: ${{ matrix.branches }} - continue-on-error: true - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 - id: versions - with: - fallbackNode: '^24' - fallbackNpm: '^11.3' - - - 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: Fix npm audit - id: npm-audit - uses: nextcloud-libraries/npm-audit-action@1b1728b2b4a7a78d69de65608efcf4db0e3e42d0 # v0.2.0 - - - name: Run npm ci and npm run build - if: steps.checkout.outcome == 'success' - env: - CYPRESS_INSTALL_BINARY: 0 - run: | - npm ci - npm run build --if-present - - - name: Create Pull Request - if: steps.checkout.outcome == 'success' - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - commit-message: 'fix(deps): Fix npm audit' - committer: GitHub - author: nextcloud-command - signoff: true - branch: automated/noid/${{ matrix.branches }}-fix-npm-audit - title: '[${{ matrix.branches }}] Fix npm audit' - body: ${{ steps.npm-audit.outputs.markdown }} - labels: | - dependencies - 3. to review diff --git a/.github/workflows/npm-build.yml b/.github/workflows/npm-build.yml deleted file mode 100644 index de17307cc57e1..0000000000000 --- a/.github/workflows/npm-build.yml +++ /dev/null @@ -1,114 +0,0 @@ -# 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: 2021-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Build Javascript - -on: pull_request - -permissions: - contents: read - -concurrency: - group: node-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest-low - permissions: - contents: read - pull-requests: read - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - 'src/**' - - 'appinfo/info.xml' - - 'package.json' - - 'package-lock.json' - - 'tsconfig.json' - - '**.js' - - '**.ts' - - '**.vue' - - build: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - name: NPM build - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 - id: versions - with: - fallbackNode: '^24' - fallbackNpm: '^11.3' - - - 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: Validate package-lock.json # See https://github.com/npm/cli/issues/4460 - run: | - npm i -g npm-package-lock-add-resolved@1.1.4 - npm-package-lock-add-resolved - git --no-pager diff --exit-code - - - name: Install dependencies & build - env: - CYPRESS_INSTALL_BINARY: 0 - PUPPETEER_SKIP_DOWNLOAD: true - run: | - npm ci - npm run build --if-present - - # Not used as we compile on CI, see update-node-dist.yml and node-dist-unchanged.yml - # - name: Check build changes - # run: | - # bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)" - - # - name: Show changes on failure - # if: failure() - # run: | - # git status - # git --no-pager diff - # exit 1 # make it red to grab attention - - summary: - permissions: - contents: none - runs-on: ubuntu-latest-low - needs: [changes, build] - - if: always() - - # This is the summary, we just avoid to rename it so that branch protection rules still match - name: node - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.build.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/object-storage.yml b/.github/workflows/object-storage.yml deleted file mode 100644 index fd4d510155ceb..0000000000000 --- a/.github/workflows/object-storage.yml +++ /dev/null @@ -1,115 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: Object storage -on: - workflow_call: - -permissions: - contents: read - -concurrency: - group: object-storage-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - object-storage: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - strategy: - fail-fast: false - matrix: - php-versions: ['8.3', '8.5'] - backend: ['s3', 'azure', 'swift'] - - name: php${{ matrix.php-versions }}-${{ matrix.backend }} - - services: - cache: - image: ghcr.io/nextcloud/continuous-integration-redis:latest # zizmor: ignore[unpinned-images] - ports: - - 6379:6379/tcp - options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 - - steps: - - name: Checkout server - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - submodules: true - - # Object stores run as plain containers instead of job services so that a - # single matrix job can pick the one it needs. - - name: Start object store - env: - BACKEND: ${{ matrix.backend }} - run: | - case "$BACKEND" in - s3) - docker run --name minio -d -p 9000:9000 -e MINIO_ROOT_USER=nextcloud -e MINIO_ROOT_PASSWORD=bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ= -e MINIO_DEFAULT_BUCKETS=nextcloud bitnami/minio@sha256:50cec18ac4184af4671a78aedd5554942c8ae105d51a465fa82037949046da01 # v2025.4.22 - echo 'OBJECT_STORE=s3' >> $GITHUB_ENV - echo 'OBJECT_STORE_KEY=nextcloud' >> $GITHUB_ENV - echo 'OBJECT_STORE_SECRET=bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ=' >> $GITHUB_ENV - ;; - azure) - docker run --name azurite -d -p 10000:10000 -e AZURITE_ACCOUNTS=nextcloud:bmV4dGNsb3Vk mcr.microsoft.com/azure-storage/azurite@sha256:0a47e12e3693483cef5c71f35468b91d751611f172d2f97414e9c69113b106d9 # v3.34.0 - echo 'OBJECT_STORE=azure' >> $GITHUB_ENV - echo 'OBJECT_STORE_KEY=nextcloud' >> $GITHUB_ENV - echo 'OBJECT_STORE_SECRET=bmV4dGNsb3Vk' >> $GITHUB_ENV - ;; - swift) - docker run --name swift -d -p 5000:5000 -p 8080:8080 ghcr.io/cscfi/docker-keystone-swift@sha256:e8b1ec21120ab9adc6ac6a2b98785fd273676439a8633fe898e37f2aea7e0712 - echo 'OBJECT_STORE=swift' >> $GITHUB_ENV - echo 'OBJECT_STORE_SECRET=veryfast' >> $GITHUB_ENV - ;; - esac - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - 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, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite - coverage: none - ini-file: development - ini-values: disable_functions="" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Nextcloud - run: | - composer install - cp tests/redis.config.php config/ - cp tests/preseed-config.php config/config.php - ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password - NC_debug=true ./occ testing:prepare-ci - php -f tests/enable_all.php - - - name: Wait for object store - env: - BACKEND: ${{ matrix.backend }} - run: | - case "$BACKEND" in - s3) - curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready - ;; - azure) - ready= - for _ in $(seq 1 60); do - if timeout 1 bash -c '< /dev/tcp/127.0.0.1/10000' 2>/dev/null; then ready=1; break; fi - sleep 1 - done - [ -n "$ready" ] || { echo 'azurite did not become ready'; exit 1; } - ;; - esac - - - name: PHPUnit - run: composer run test -- --group PRIMARY-${{ matrix.backend }} --log-junit junit.xml - - - name: Object store logs - if: always() - run: | - docker ps -a - docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.yml deleted file mode 100644 index def87e2543065..0000000000000 --- a/.github/workflows/openapi.yml +++ /dev/null @@ -1,48 +0,0 @@ -# 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: 2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2024 Arthur Schiwon -# SPDX-License-Identifier: MIT - -name: OpenAPI - -on: pull_request - -permissions: - contents: read - -concurrency: - group: openapi-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - openapi: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Set up php - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - with: - php-version: '8.3' - extensions: ctype, curl, dom, fileinfo, gd, json, libxml, mbstring, openssl, pcntl, pdo, posix, session, simplexml, xml, xmlreader, xmlwriter, zip, zlib - coverage: none - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up dependencies - run: composer i - - - name: OpenAPI checker - run: build/openapi-checker.sh diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml deleted file mode 100644 index fe0ac28e54e18..0000000000000 --- a/.github/workflows/performance.yml +++ /dev/null @@ -1,124 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: Performance testing -on: - pull_request: - -permissions: - contents: read - -concurrency: - group: performance-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - performance-testing: - runs-on: ubuntu-latest - - # Skip entirely on fork PRs so the job result is 'skipped' rather than - # 'failure'. The profiler action uses github.event.pull_request.head.repo.clone_url - # and GITHUB_TOKEN in ways that do not work reliably from forks, and a - # clean skip is far less confusing for contributors than a mid-run error. - if: >- - github.repository_owner != 'nextcloud-gmbh' && - github.event.pull_request.head.repo.full_name == github.repository - - permissions: - pull-requests: write - - name: performance - - steps: - - - name: Checkout server before PR - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - submodules: true - ref: ${{ github.event.pull_request.base.ref }} - - - name: Set up php - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - with: - php-version: '8.3' - extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Nextcloud - run: | - mkdir data - ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password - - php -S localhost:8080 & - - name: Apply blueprint - uses: icewind1991/blueprint@00504403f76cb2a09efd0d16793575055e6f63cb # v0.1.2 - with: - blueprint: tests/blueprints/basic.toml - ref: ${{ github.event.pull_request.head.ref }} - - - name: Run before measurements - uses: nextcloud/profiler@6a74c915048285b35b8e1cd96c0835a635945044 - with: - run: | - curl -s -X PROPFIND -u test:test http://localhost:8080/remote.php/dav/files/test - curl -s -u test:test http://localhost:8080/remote.php/dav/files/test/test.txt - curl -s -X PROPFIND -u test:test http://localhost:8080/remote.php/dav/files/test/many_files - curl -s -u test:test -T README.md http://localhost:8080/remote.php/dav/files/test/new_file.txt - curl -s -u test:test -X DELETE http://localhost:8080/remote.php/dav/files/test/new_file.txt - output: before.json - profiler-branch: master - - - name: Apply PR # zizmor: ignore[template-injection] - run: | - git remote add pr '${{ github.event.pull_request.head.repo.clone_url }}' - git fetch pr '${{ github.event.pull_request.head.ref }}' - git checkout -b 'pr/${{ github.event.pull_request.head.ref }}' - git submodule update - - ./occ upgrade - - - name: Run after measurements - id: compare - uses: nextcloud/profiler@6a74c915048285b35b8e1cd96c0835a635945044 - with: - run: | - curl -s -X PROPFIND -u test:test http://localhost:8080/remote.php/dav/files/test - curl -s -u test:test http://localhost:8080/remote.php/dav/files/test/test.txt - curl -s -X PROPFIND -u test:test http://localhost:8080/remote.php/dav/files/test/many_files - curl -s -u test:test -T README.md http://localhost:8080/remote.php/dav/files/test/new_file.txt - curl -s -u test:test -X DELETE http://localhost:8080/remote.php/dav/files/test/new_file.txt - output: after.json - profiler-branch: master - compare-with: before.json - - - name: Upload profiles - if: always() - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a - with: - name: profiles - path: | - before.json - after.json - - - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - if: failure() && steps.compare.outcome == 'failure' - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - let comment = `Possible performance regression detected\n`; - comment += `
Show Output - - \`\`\` - ${{ steps.compare.outputs.compare }} - \`\`\` - -
`; - - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: comment - }) diff --git a/.github/workflows/phpunit-32bits.yml b/.github/workflows/phpunit-32bits.yml index b0ec1ae62d564..f0ab470906ed2 100644 --- a/.github/workflows/phpunit-32bits.yml +++ b/.github/workflows/phpunit-32bits.yml @@ -25,7 +25,7 @@ concurrency: jobs: phpunit-32bits: - runs-on: ubuntu-latest + runs-on: ubuntu-garm7 if: ${{ github.repository_owner != 'nextcloud-gmbh' }} diff --git a/.github/workflows/phpunit-kvstore.yml b/.github/workflows/phpunit-kvstore.yml index b41780c79ae14..891d9e09a3d98 100644 --- a/.github/workflows/phpunit-kvstore.yml +++ b/.github/workflows/phpunit-kvstore.yml @@ -14,7 +14,7 @@ env: jobs: phpunit-kvstore: - runs-on: ubuntu-latest + runs-on: ubuntu-garm7 strategy: fail-fast: false diff --git a/.github/workflows/phpunit-mariadb.yml b/.github/workflows/phpunit-mariadb.yml index 506d620c1b770..7c7a4e299cbf3 100644 --- a/.github/workflows/phpunit-mariadb.yml +++ b/.github/workflows/phpunit-mariadb.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-mariadb: - runs-on: ubuntu-latest + runs-on: ubuntu-garm7 strategy: fail-fast: false diff --git a/.github/workflows/phpunit-memcached.yml b/.github/workflows/phpunit-memcached.yml index 96dc657e6cb41..1c2659c6964f1 100644 --- a/.github/workflows/phpunit-memcached.yml +++ b/.github/workflows/phpunit-memcached.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-memcached: - runs-on: ubuntu-latest + runs-on: ubuntu-garm7 strategy: fail-fast: false diff --git a/.github/workflows/phpunit-mysql-sharding.yml b/.github/workflows/phpunit-mysql-sharding.yml index 191f3969b4c6b..08def17e15750 100644 --- a/.github/workflows/phpunit-mysql-sharding.yml +++ b/.github/workflows/phpunit-mysql-sharding.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-mysql: - runs-on: ubuntu-latest + runs-on: ubuntu-garm7 strategy: fail-fast: false diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index b70971711b670..4715377b371bb 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-mysql: - runs-on: ubuntu-latest + runs-on: ubuntu-garm7 strategy: fail-fast: false diff --git a/.github/workflows/phpunit-nodb.yml b/.github/workflows/phpunit-nodb.yml index 488bdb5de339e..4e7a9e1175ade 100644 --- a/.github/workflows/phpunit-nodb.yml +++ b/.github/workflows/phpunit-nodb.yml @@ -18,7 +18,7 @@ permissions: jobs: phpunit-nodb: - runs-on: ubuntu-latest + runs-on: ubuntu-garm7 strategy: fail-fast: false diff --git a/.github/workflows/phpunit-object-store-primary.yml b/.github/workflows/phpunit-object-store-primary.yml index f72baa62f007f..3cf13fbc150bf 100644 --- a/.github/workflows/phpunit-object-store-primary.yml +++ b/.github/workflows/phpunit-object-store-primary.yml @@ -9,7 +9,7 @@ permissions: jobs: object-store-primary-tests-minio: - runs-on: ubuntu-latest + runs-on: ubuntu-garm7 if: ${{ github.repository_owner != 'nextcloud-gmbh' }} diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml index b5850ad803cd4..920e8a37d7557 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-oci: - runs-on: ubuntu-latest + runs-on: ubuntu-garm7 if: ${{ github.repository_owner != 'nextcloud-gmbh' }} diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml index 864f197f6ec7b..3908c84a70516 100644 --- a/.github/workflows/phpunit-pgsql.yml +++ b/.github/workflows/phpunit-pgsql.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-pgsql: - runs-on: ubuntu-latest + runs-on: ubuntu-garm7 strategy: fail-fast: false diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index 18ef061de335f..275a18a7fdcd5 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-sqlite: - runs-on: ubuntu-latest + runs-on: ubuntu-garm7 strategy: fail-fast: false diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml deleted file mode 100644 index 65afbe86b1225..0000000000000 --- a/.github/workflows/playwright.yml +++ /dev/null @@ -1,331 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Playwright Tests - -on: - pull_request: - branches: - - master - - stable35 - types: - - opened - - synchronize - - reopened - - ready_for_review - - labeled - -permissions: - contents: read - -concurrency: - group: playwright-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - gate: - runs-on: ubuntu-latest-low - steps: - - name: Evaluate e2e tests execution conditions - id: gate-e2e - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - with: - script: | - const pr = context.payload.pull_request - - const hasForceLabel = pr.labels.some((label) => label.name === 'force-e2e-tests') - const hasToReviewLabel = pr.labels.some((label) => label.name === '3. to review') - const hasToReleaseLabel = pr.labels.some((label) => label.name === '4. to release') - - if (hasForceLabel || hasToReviewLabel || hasToReleaseLabel) { - return - } - - const files = await github.paginate(github.rest.pulls.listFiles, { - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: pr.number, - per_page: 100, - }) - const playwrightTouched = files.some((file) => file.filename.startsWith('tests/playwright')) - - if (!playwrightTouched) { - core.setFailed('Skipping Playwright: draft state, missing labels or no playwright path changes.') - } - - playwright-setup: - timeout-minutes: 15 - name: Playwright setup - runs-on: ubuntu-latest - needs: gate - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - submodules: true # for 3rdparty - - 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: [gate, playwright-setup] - timeout-minutes: 60 - name: Playwright tests ${{ matrix.shardIndex }} / ${{ matrix.shardTotal }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - shardIndex: [1, 2, 3, 4, 5, 6, 7, 8] - shardTotal: [8] - 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 - submodules: true # for 3rdparty - - - 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: Show logs - if: failure() - run: | - for id in $(docker ps -aq); do - docker container inspect "$id" --format '=== Logs for container {{.Name}} ===' - docker logs "$id" >> nextcloud.log - done - echo '=== Nextcloud server logs ===' - docker exec nextcloud-e2e-test-server_server cat data/nextcloud.log - - - 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 - - playwright-installer-tests: - needs: [gate, playwright-setup] - timeout-minutes: 30 - name: Playwright tests for installer - runs-on: ubuntu-latest - - # The installation-wizard tests exercise every supported database backend, so - # they need reachable database service containers. The Nextcloud container is - # joined to the GitHub Actions network at startup so it can resolve these by - # hostname (see tests/playwright/start-nextcloud-server.js). - services: - mysql: - image: mysql:9.7 # zizmor: ignore[unpinned-images] - ports: - - '3306/tcp' - env: - MYSQL_ROOT_PASSWORD: rootpassword - MYSQL_USER: nextcloud - MYSQL_PASSWORD: nextcloud - MYSQL_DATABASE: nextcloud - options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10 - - mariadb: - image: mariadb:12.3 # zizmor: ignore[unpinned-images] - ports: - - '3306/tcp' - env: - MARIADB_ROOT_PASSWORD: rootpassword - MARIADB_USER: nextcloud - MARIADB_PASSWORD: nextcloud - MARIADB_DATABASE: nextcloud - options: --health-cmd="mariadb-admin ping" --health-interval 5s --health-timeout 2s --health-retries 5 - - postgres: - image: postgres:18 # zizmor: ignore[unpinned-images] - ports: - - '5432/tcp' - env: - POSTGRES_USER: root - POSTGRES_PASSWORD: rootpassword - POSTGRES_DB: nextcloud - options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5 - - oracle: - image: ghcr.io/gvenzl/oracle-free:23 # zizmor: ignore[unpinned-images] - ports: - - '1521' - env: - ORACLE_PASSWORD: oracle - options: --health-cmd healthcheck.sh --health-interval 20s --health-timeout 10s --health-retries 10 - - 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 - submodules: true # for 3rdparty - - - 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 setup tests - run: npm run playwright:setup - env: - PLAYWRIGHT_SETUP: 'true' - - - name: Show logs - if: failure() - run: | - for id in $(docker ps -aq); do - docker container inspect "$id" --format '=== Logs for container {{.Name}} ===' - docker logs "$id" >> nextcloud.log - done - echo '=== Nextcloud server logs ===' - docker exec nextcloud-e2e-test-server_server cat data/nextcloud.log || true - - - name: Upload blob report to GitHub Actions Artifacts - if: ${{ !cancelled() }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: blob-report-setup - path: blob-report - retention-days: 1 - - merge-reports: - # Merge reports after playwright-tests, even if some shards have failed - if: ${{ !cancelled() && needs.gate.result == 'success' }} - needs: [gate, playwright-tests, playwright-installer-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: 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: [gate, playwright-tests, playwright-installer-tests] - - if: always() - - name: playwright-test-summary - - steps: - - name: Summary status - run: if ${{ needs.playwright-tests.result != 'success' || needs.playwright-installer-tests.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/pr-feedback.yml b/.github/workflows/pr-feedback.yml deleted file mode 100644 index 4420bf6922498..0000000000000 --- a/.github/workflows/pr-feedback.yml +++ /dev/null @@ -1,55 +0,0 @@ -# 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: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Marcel Klehr -# SPDX-FileCopyrightText: 2023 Joas Schilling <213943+nickvergessen@users.noreply.github.com> -# SPDX-FileCopyrightText: 2023 Daniel Kesselberg -# SPDX-FileCopyrightText: 2023 Florian Steffens -# SPDX-License-Identifier: MIT - -name: 'Ask for feedback on PRs' -on: - schedule: - - cron: '30 1 * * *' - -permissions: - contents: read - pull-requests: write - -jobs: - pr-feedback: - if: ${{ github.repository_owner == 'nextcloud' }} - runs-on: ubuntu-latest - steps: - - name: The get-github-handles-from-website action - uses: marcelklehr/get-github-handles-from-website-action@06b2239db0a48fe1484ba0bfd966a3ab81a08308 # v1.0.1 - id: scrape - with: - website: 'https://nextcloud.com/team/' - - - name: Get blocklist - id: blocklist - run: | - 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 - with: - feedback-message: | - Hello there, - Thank you so much for taking the time and effort to create a pull request to our Nextcloud project. - - We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. - - Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 - - Thank you for contributing to Nextcloud and we hope to hear from you soon! - - (If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).) - days-before-feedback: 14 - start-date: '2025-06-12' - exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}' - exempt-bots: true diff --git a/.github/workflows/rector-apply.yml b/.github/workflows/rector-apply.yml deleted file mode 100644 index ddc2af4e05bb7..0000000000000 --- a/.github/workflows/rector-apply.yml +++ /dev/null @@ -1,65 +0,0 @@ -# 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 - -name: Apply rector changes - -on: - workflow_dispatch: - schedule: - # At 14:30 on Sundays - - cron: '30 14 * * 0' - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - - name: rector-apply - - steps: - - name: Checkout - id: checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - ref: ${{ github.event.repository.default_branch }} - - - name: Set up php - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - with: - php-version: '8.3' - 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 - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Install dependencies - run: | - composer remove nextcloud/ocp --dev --no-scripts - composer i - git restore lib/composer/composer - - - name: Rector - run: composer run rector - - - name: Create Pull Request - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - commit-message: 'refactor: Apply rector changes' - committer: GitHub - author: nextcloud-command - signoff: true - branch: automated/noid/rector-changes - title: 'Apply rector changes' - labels: | - technical debt - 3. to review diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml deleted file mode 100644 index 0e5c3c6cbd742..0000000000000 --- a/.github/workflows/rector.yml +++ /dev/null @@ -1,83 +0,0 @@ -# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: AGPL-3.0-or-later -name: Rector - -on: - pull_request: - -permissions: - contents: read - -concurrency: - group: rector-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest-low - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/lib/**' - - '**/tests/**' - - '**/vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - '**.php' - - strict: - runs-on: ubuntu-latest - - needs: changes - if: ${{ needs.changes.outputs.src != 'false' && github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }} - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - submodules: true - - - name: Set up php - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - with: - php-version: '8.3' - extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,imagick,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip - coverage: none - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Composer install - run: composer i - - - name: Rector - run: composer run rector:strict - - - name: Show changes - if: always() - run: git diff --exit-code -- . ':!lib/composer' - - summary: - permissions: - contents: none - runs-on: ubuntu-latest-low - needs: [changes, strict] - - if: always() - - name: rector-summary - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.strict.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml deleted file mode 100644 index 67fdafc440e24..0000000000000 --- a/.github/workflows/reuse.yml +++ /dev/null @@ -1,27 +0,0 @@ -# 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: 2022 Free Software Foundation Europe e.V. -# -# SPDX-License-Identifier: CC0-1.0 - -name: REUSE Compliance Check - -on: [pull_request] - -permissions: - contents: read - -jobs: - reuse-compliance-check: - runs-on: ubuntu-latest-low - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: REUSE Compliance Check - uses: fsfe/reuse-action@676e2d560c9a403aa252096d99fcab3e1132b0f5 # v6.0.0 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 64dad39980674..0000000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,57 +0,0 @@ -# SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: Close and lock stale issues - -on: - workflow_dispatch: - schedule: - - cron: "0 0 * * *" - -permissions: - contents: read - -jobs: - stale: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - permissions: - issues: write - - steps: - - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0 - with: - repo-token: ${{ secrets.COMMAND_BOT_PAT }} - stale-issue-message: > - This issue has been automatically marked as stale because it has not had - recent activity and seems to be missing some essential information. - It will be closed if no further activity occurs. Thank you - for your contributions. - stale-issue-label: 'stale' - only-labels: 'needs info' - exempt-issue-labels: '1. to develop,2. developing,3. to review,4. to release,security' - days-before-stale: 30 - days-before-close: 14 - - lock: - runs-on: ubuntu-latest - - steps: - - uses: dessant/lock-threads@89ae32b08ed1a541efecbab17912962a5e38981c # v6.0.2 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - issue-inactive-days: 14 - issue-comment: > - This issue has been automatically locked because it has been closed for more than 14 days. - As we do not monitor closed issues, we are locking this issue to prevent further comments from getting lost in the noise. - - Please open a new issue if you have a similar problem instead. - For general discussions, please use our forum: https://help.nextcloud.com - pr-inactive-days: 7 - pr-comment: > - This pull request has been automatically locked because it has been closed for more than 7 days. - As we do not monitor merged or closed pull requests, we are locking this pull request to prevent further comments from getting lost in the noise. - - If you discovered any issues with this pull request, please open a new issue instead. - In case you want to discuss this pull request or have further questions, please use our forum: https://help.nextcloud.com diff --git a/.github/workflows/static-code-analysis.yml b/.github/workflows/static-code-analysis.yml deleted file mode 100644 index 9d64c76ef3493..0000000000000 --- a/.github/workflows/static-code-analysis.yml +++ /dev/null @@ -1,243 +0,0 @@ -# SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: Psalm static code analysis - -on: - pull_request: - push: - branches: - - main - - master - - stable* - paths: - - '.github/workflows/static-code-analysis.yml' - - '**.php' - -permissions: - contents: read - -concurrency: - group: static-code-analysis-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest-low - - outputs: - src: ${{ steps.changes.outputs.src }} - - steps: - - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/appinfo/**' - - '**/lib/**' - - '**/templates/**' - - 'vendor/**' - - 'vendor-bin/**' - - 'composer.json' - - 'composer.lock' - - 'psalm*.xml' - - 'build/psalm-baseline*.xml' - - '**.php' - - static-code-analysis: - runs-on: ubuntu-latest - - needs: changes - if: ${{ needs.changes.outputs.src != 'false' && github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }} - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - with: - persist-credentials: false - submodules: true - - - name: Set up php - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - with: - php-version: '8.3' - extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,imagick,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip - coverage: none - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Composer install - run: composer i - - - name: Psalm - run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github --update-baseline - - - name: Show potential changes in Psalm baseline - if: always() - run: git diff --exit-code -- . ':!lib/composer' - - static-code-analysis-security: - runs-on: ubuntu-latest - - needs: changes - if: ${{ needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh' }} - - permissions: - security-events: write - - steps: - - name: Checkout code - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - with: - persist-credentials: false - submodules: true - - - name: Set up php - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - with: - php-version: '8.3' - extensions: ctype,curl,dom,fileinfo,ftp,gd,imagick,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip - coverage: none - - - name: Composer install - run: composer i - - - name: Psalm taint analysis - run: composer run psalm:security -- --threads=1 --monochrome --no-progress --output-format=github --update-baseline --report=results.sarif --report-show-info=false - - # Psalm exits 0 on taint findings when a report file is generated - - name: Fail on taint analysis findings - run: | - count=$(jq '[.runs[].results[]] | length' results.sarif) - echo "Taint analysis findings: $count" - test "$count" -eq 0 - - - name: Show potential changes in Psalm baseline - if: always() - run: git diff --exit-code -- . ':!lib/composer' - - - name: Upload Security Analysis results to GitHub - if: always() - uses: github/codeql-action/upload-sarif@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4.38.1 - with: - sarif_file: results.sarif - - static-code-analysis-ocp: - runs-on: ubuntu-latest - - needs: changes - if: ${{ needs.changes.outputs.src != 'false' && github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }} - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - with: - persist-credentials: false - submodules: true - - - name: Set up php - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - with: - php-version: '8.3' - extensions: ctype,curl,dom,fileinfo,gd,imagick,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip - coverage: none - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Composer install - run: composer i - - - name: Psalm - run: composer run psalm:ocp -- --threads=1 --monochrome --no-progress --output-format=github --update-baseline - - - name: Show potential changes in Psalm baseline - if: always() - run: git diff --exit-code -- . ':!lib/composer' - - static-code-analysis-ncu: - runs-on: ubuntu-latest - - needs: changes - if: ${{ needs.changes.outputs.src != 'false' && github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }} - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - with: - persist-credentials: false - submodules: true - - - name: Set up php - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - timeout-minutes: 5 - with: - php-version: '8.3' - extensions: ctype,curl,dom,fileinfo,gd,imagick,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip - coverage: none - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Composer install - run: composer i - - - name: Psalm - run: composer run psalm:ncu -- --threads=1 --monochrome --no-progress --output-format=github - - static-code-analysis-strict: - runs-on: ubuntu-latest - - needs: changes - if: ${{ needs.changes.outputs.src != 'false' && github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }} - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - with: - persist-credentials: false - submodules: true - - - name: Set up php - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 - with: - php-version: '8.3' - extensions: ctype,curl,dom,fileinfo,gd,imagick,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip - coverage: none - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Composer install - run: composer i - - - name: Psalm - run: composer run psalm:strict -- --threads=1 --monochrome --no-progress --output-format=github - - summary: - permissions: - contents: none - runs-on: ubuntu-latest-low - needs: [changes, static-code-analysis, static-code-analysis-security, static-code-analysis-ocp, static-code-analysis-ncu, static-code-analysis-strict] - - if: always() - - name: static-code-analysis-summary - - steps: - - name: Summary status - run: | - if ${{ needs.changes.outputs.src != 'false' && ( - needs.static-code-analysis-security.result != 'success' || - (github.event_name != 'push' && ( - needs.static-code-analysis.result != 'success' || - needs.static-code-analysis-ocp.result != 'success' || - needs.static-code-analysis-ncu.result != 'success' || - needs.static-code-analysis-strict.result != 'success' - )) - ) }}; then - exit 1 - fi diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml deleted file mode 100644 index 09241a365adba..0000000000000 --- a/.github/workflows/storage.yml +++ /dev/null @@ -1,98 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Storage - -on: - pull_request: - schedule: - - cron: "5 2 * * *" - -permissions: - contents: read - -concurrency: - group: storage-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -# GitHub allows a maximum of 20 reusable workflows per caller -jobs: - changes: - runs-on: ubuntu-latest-low - permissions: - contents: read - pull-requests: read - - outputs: - files-external: ${{ steps.changes.outputs.files-external }} - integration: ${{ steps.changes.outputs.integration }} - object-storage: ${{ steps.changes.outputs.object-storage }} - - steps: - - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 - id: changes - continue-on-error: true - with: - filters: | - shared: &shared - - '3rdparty/**' - - 'vendor/**' - - 'composer.json' - - 'composer.lock' - - 'apps/files/lib/**' - - 'apps/files/tests/**' - - 'apps/files_external/**' - - 'apps/files_sharing/lib/**' - - 'apps/files_sharing/tests/**' - - 'apps/files_trashbin/lib/**' - - 'apps/files_trashbin/tests/**' - - 'apps/files_versions/lib/**' - - 'apps/files_versions/tests/**' - - 'lib/private/Files/**' - - 'lib/public/Files/**' - - 'tests/lib/Files/**' - phpunit: &phpunit - - 'vendor-bin/phpunit/**' - object-storage: - - *shared - - *phpunit - - '.github/workflows/object-storage.yml' - files-external: - - *shared - - *phpunit - - '.github/workflows/files-external.yml' - integration: - - *shared - - 'vendor-bin/behat/**' - - 'build/integration/**' - - '.github/workflows/integration-s3-primary.yml' - - files-external: - needs: changes - if: needs.changes.outputs.files-external != 'false' - uses: ./.github/workflows/files-external.yml - - object-storage: - needs: changes - if: needs.changes.outputs.object-storage != 'false' - uses: ./.github/workflows/object-storage.yml - - integration-s3-primary: - needs: changes - if: needs.changes.outputs.integration != 'false' - uses: ./.github/workflows/integration-s3-primary.yml - - summary: - permissions: - contents: none - runs-on: ubuntu-latest-low - needs: [changes, files-external, object-storage, integration-s3-primary] - - if: always() - - name: storage-summary - - steps: - # Skipped jobs are fine, they mean no relevant changes were detected - - name: Summary status - run: if ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}; then exit 1; fi diff --git a/.github/workflows/update-cacert-bundle.yml b/.github/workflows/update-cacert-bundle.yml deleted file mode 100644 index 270585a28d4e0..0000000000000 --- a/.github/workflows/update-cacert-bundle.yml +++ /dev/null @@ -1,64 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: Update CA certificate bundle - -on: - workflow_dispatch: - schedule: - - cron: "5 2 * * *" - -permissions: - contents: read - -jobs: - update-ca-certificate-bundle: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - branches: - - ${{ github.event.repository.default_branch }} - - 'stable35' - - 'stable34' - - 'stable33' - - 'stable32' - - 'stable31' - - 'stable30' - - 'stable29' - - 'stable28' - - 'stable27' - - 'stable26' - - 'stable25' - - 'stable24' - - 'stable23' - - 'stable22' - - name: update-ca-certificate-bundle-${{ matrix.branches }} - - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - ref: ${{ matrix.branches }} - submodules: true - - - name: Download CA certificate bundle from curl - run: curl --etag-compare build/ca-bundle-etag.txt --etag-save build/ca-bundle-etag.txt --output resources/config/ca-bundle.crt https://curl.se/ca/cacert.pem - - - name: Create Pull Request - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - commit-message: 'fix(security): Update CA certificate bundle' - committer: GitHub - author: nextcloud-command - signoff: true - branch: 'automated/noid/${{ matrix.branches }}-update-ca-cert-bundle' - title: '[${{ matrix.branches }}] fix(security): Update CA certificate bundle' - body: | - Auto-generated update of CA certificate bundle from [https://curl.se/docs/caextract.html](https://curl.se/docs/caextract.html) - labels: | - dependencies - 3. to review - reviewers: ChristophWurst, miaulalala, nickvergessen diff --git a/.github/workflows/update-code-signing-crl.yml b/.github/workflows/update-code-signing-crl.yml deleted file mode 100644 index 30d4db282a78d..0000000000000 --- a/.github/workflows/update-code-signing-crl.yml +++ /dev/null @@ -1,71 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: Update code signing revocation list - -on: - workflow_dispatch: - schedule: - - cron: "5 2 * * *" - -permissions: - contents: read - -jobs: - update-code-signing-crl: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - max-parallel: 1 - matrix: - branches: - - ${{ github.event.repository.default_branch }} - - 'stable35' - - 'stable34' - - 'stable33' - - 'stable32' - - 'stable31' - - 'stable30' - - 'stable29' - - 'stable28' - - 'stable27' - - 'stable26' - - 'stable25' - - 'stable24' - - 'stable23' - - 'stable22' - - name: update-code-signing-crl-${{ matrix.branches }} - - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - ref: ${{ matrix.branches }} - submodules: true - - - name: Download CRL file from Appstore repository - run: curl --output resources/codesigning/root.crl https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/certificate/nextcloud.crl - - - name: Verify CRL is from CRT - run: openssl crl -verify -in resources/codesigning/root.crl -CAfile resources/codesigning/root.crt -noout - - - name: Create Pull Request - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - commit-message: | - fix(security): Update code signing revocation list - - [skip ci] - committer: GitHub - author: nextcloud-command - signoff: true - branch: 'automated/noid/${{ matrix.branches }}-update-code-signing-crl' - title: '[${{ matrix.branches }}] fix(security): Update code signing revocation list' - body: | - Auto-generated update of code signing revocation list from [Appstore](https://github.com/nextcloud/appstore/commits/master/nextcloudappstore/certificate/nextcloud.crl) - labels: | - dependencies - 3. to review - reviewers: mgallien, miaulalala, nickvergessen diff --git a/.github/workflows/update-min-supported-desktop.yml b/.github/workflows/update-min-supported-desktop.yml deleted file mode 100644 index 9c6648d7dc04b..0000000000000 --- a/.github/workflows/update-min-supported-desktop.yml +++ /dev/null @@ -1,128 +0,0 @@ -# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Update min supported desktop version - -on: - workflow_dispatch: - schedule: - - cron: "0 0 * * 1" - -permissions: - contents: read - -jobs: - update-minimum-supported-desktop-version: - runs-on: ubuntu-latest-low - - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - submodules: true - - - name: Download desktop client version file from 5 years ago - id: download - run: | - # Create a temporary directory for the downloaded file - mkdir -p tmp - - # Download the version file from the provided URL - VERSION_FILE_URL="https://github.com/nextcloud/desktop/raw/@%7B5.years.ago%7D/VERSION.cmake" - - # Download the file using curl - curl -s -L "$VERSION_FILE_URL" -o tmp/VERSION.cmake - - if [ ! -f "tmp/VERSION.cmake" ]; then - echo "Failed to download VERSION.cmake file" - exit 1 - fi - - echo "VERSION_FILE=tmp/VERSION.cmake" >> $GITHUB_OUTPUT - echo "Downloaded version file to tmp/VERSION.cmake" - - - name: Extract version info - id: extract-version - run: | - # Path to the downloaded version file - VERSION_FILE="${{ steps.download.outputs.VERSION_FILE }}" - - # Extract major, minor, patch versions - MAJOR=$(grep "VERSION_MAJOR" $VERSION_FILE | grep -o '[0-9]\+') - MINOR=$(grep "VERSION_MINOR" $VERSION_FILE | grep -o '[0-9]\+') - PATCH=$(grep "VERSION_PATCH" $VERSION_FILE | grep -o '[0-9]\+') - - # Construct the version string - VERSION="$MAJOR.$MINOR.$PATCH" - - # Validate format: xx.xx.xx where each x is a digit - if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "Error: Extracted version '$VERSION' does not match required format (xx.xx.xx)" - exit 1 - fi - - rm -rf tmp - - echo "VERSION=$VERSION" >> $GITHUB_OUTPUT - echo "Extracted Version: $VERSION" - - - name: Update files with new version ${{ steps.extract-version.outputs.VERSION }} - id: update-files - run: | - VERSION="${{ steps.extract-version.outputs.VERSION }}" - - # Define the files to update - DAV_FILE="apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php" - CONFIG_FILE="config/config.sample.php" - - # Check if files exist - if [ ! -f "$DAV_FILE" ]; then - echo "Error: DAV file not found at $DAV_FILE" - exit 1 - fi - - if [ ! -f "$CONFIG_FILE" ]; then - echo "Error: Config file not found at $CONFIG_FILE" - exit 1 - fi - - # Update the DAV file - replace the version in the specific line - sed -i "s/\('minimum\.supported\.desktop\.version', '\)[0-9]\+\.[0-9]\+\.[0-9]\+'/\1$VERSION'/g" "$DAV_FILE" - echo "Updated $DAV_FILE" - - # Update the config sample file - PREV_VERSION=$(grep "'minimum.supported.desktop.version'" "$CONFIG_FILE" | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+') - sed -i "s/Defaults to \`\`$PREV_VERSION\`\`/Defaults to \`\`$VERSION\`\`/" "$CONFIG_FILE" - sed -i "s/'minimum\.supported\.desktop\.version' => '[0-9]\+\.[0-9]\+\.[0-9]\+'/'minimum.supported.desktop.version' => '$VERSION'/g" "$CONFIG_FILE" - echo "Updated $CONFIG_FILE" - - # Check if any changes were made - if [ -n "$(git diff "$DAV_FILE" "$CONFIG_FILE")" ]; then - echo "CHANGES_MADE=true" >> $GITHUB_OUTPUT - echo "Changes were made to the files" - git diff "$DAV_FILE" "$CONFIG_FILE" - else - echo "CHANGES_MADE=false" >> $GITHUB_OUTPUT - echo "No changes were needed (versions might already be up to date)" - fi - - - name: Create Pull Request - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 - if: steps.update-files.outputs.CHANGES_MADE == 'true' - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - commit-message: "chore: Update minimum supported desktop version" - committer: GitHub - author: nextcloud-command - signoff: true - branch: "automated/noid/update-min-supported-desktop-version" - title: "chore: Update minimum supported desktop version to ${{ steps.extract-version.outputs.VERSION }}" - base: "master" - body: | - Auto-generated update of the minimum supported desktop version using last supported version. - https://github.com/nextcloud/desktop/blob/@%7B5.years.ago%7D/VERSION.cmake - labels: | - client: 💻 desktop - automated - 3. to review - reviewers: '@nextcloud/desktop' diff --git a/.github/workflows/update-node-dist.yml b/.github/workflows/update-node-dist.yml deleted file mode 100644 index b16e05538ab34..0000000000000 --- a/.github/workflows/update-node-dist.yml +++ /dev/null @@ -1,85 +0,0 @@ -# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: AGPL-3.0-or-later - -name: Update Node dist - -on: - workflow_dispatch: - push: - branches: - # implemented since 35, once branched off, add your stable branch here - - master - - stable35 - -permissions: - contents: write - -concurrency: - group: update-node-dist-${{ github.head_ref || github.ref || github.run_id }} - -jobs: - update-node-dist: - runs-on: ubuntu-latest-assets - environment: update-node-dist - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - # Needed to allow force push later - persist-credentials: true - token: ${{ secrets.BOT_GITHUB_TOKEN }} - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 - id: versions - with: - fallbackNode: '^20' - fallbackNpm: '^9' - - - 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: Setup git - run: | - git config --local user.email "nextcloud-command@users.noreply.github.com" - git config --local user.name "nextcloud-command" - - - name: Get last commit message if it was not a recompile - id: last_commit - run: | - { - echo 'MESSAGE<> $GITHUB_OUTPUT - - - name: Install dependencies & build - if: steps.last_commit.outputs.MESSAGE != '' - env: - CYPRESS_INSTALL_BINARY: 0 - run: | - npm ci - npm run build --if-present - - - name: Check webpack build changes - id: changes - continue-on-error: true - run: | - { - echo 'CHANGED<> "$GITHUB_OUTPUT" - - - name: Add and commit - if: steps.changes.outputs.CHANGED != '' - run: | - git add --force dist/ core/css/ - git commit --signoff -m 'chore(assets): recompile assets' - git push origin ${GITHUB_HEAD_REF} diff --git a/.github/workflows/update-stable-titles.yml b/.github/workflows/update-stable-titles.yml deleted file mode 100644 index 8fe443f027c7c..0000000000000 --- a/.github/workflows/update-stable-titles.yml +++ /dev/null @@ -1,69 +0,0 @@ -# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -name: Update PRs titles on stable branches - -on: - pull_request: - types: [opened, edited] - branches: - - "stable*" - -concurrency: - group: stable-pr-title-${{ github.event.pull_request.number }} - cancel-in-progress: true - -jobs: - update-pr-title: - runs-on: ubuntu-latest-low - permissions: - pull-requests: write - contents: read - - steps: - - name: Wait for potential title edits - run: sleep 15 - - - name: Get PR details and update title - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const { data: pr } = await github.rest.pulls.get({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number, - }); - - const baseBranch = pr.base.ref; - const currentTitle = pr.title; - - // Check if this is a stable branch - // Should not happen as we only trigger on stable* branches 🤷‍♀️ - if (!baseBranch.startsWith('stable')) { - console.log(`Not a stable branch: ${baseBranch}`); - return; - } - - const prefix = `[${baseBranch}]`; - - // Check if title already has the correct prefix and no other stable tags - const correctTagRegex = new RegExp(`^\\[${baseBranch}\\]\\s*`); - const hasOtherStableTags = /\[stable[\d.]*\]/.test(currentTitle.replace(correctTagRegex, '')); - - if (correctTagRegex.test(currentTitle) && !hasOtherStableTags) { - console.log(`Title already has correct prefix only: ${currentTitle}`); - return; - } - - // Remove all stable tags and add the correct one - const cleanTitle = currentTitle.replace(/\[stable[\d.]*\]\s*/g, '').trim(); - const newTitle = `${prefix} ${cleanTitle}`; - - console.log(`Updating title from: "${currentTitle}" to: "${newTitle}"`); - - await github.rest.pulls.update({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number, - title: newTitle, - });