From 39dcf36594816fa6708f77daf0fea7c6bd3e4d2a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 26 Jan 2024 20:35:05 +0100 Subject: [PATCH] Remove other tests --- .drone.yml | 197 +----------------- .github/workflows/block-merge-eol.yml | 37 ---- .github/workflows/block-merge-freeze.yml | 32 --- .github/workflows/command-compile.yml | 126 ----------- .github/workflows/command-pull-3rdparty.yml | 60 ------ .github/workflows/command-rebase.yml | 51 ----- .github/workflows/cypress.yml | 162 -------------- .../workflows/dependabot-approve-merge.yml | 40 ---- .github/workflows/files-external-s3.yml | 186 ----------------- .github/workflows/fixup.yml | 33 --- .github/workflows/ftp.yml | 84 -------- .github/workflows/integration-s3-primary.yml | 101 --------- .github/workflows/integration-sqlite.yml | 167 --------------- .github/workflows/lint-eslint.yml | 96 --------- .github/workflows/lint-php-cs.yml | 78 ------- .github/workflows/lint-php.yml | 82 -------- .github/workflows/node-tests.yml | 169 --------------- .github/workflows/node.yml | 100 --------- .github/workflows/npm-audit-fix.yml | 74 ------- .github/workflows/object-storage-azure.yml | 125 ----------- .github/workflows/object-storage-swift.yml | 121 ----------- .github/workflows/openapi.yml | 33 --- .github/workflows/performance.yml | 111 ---------- .github/workflows/phpunit-32bits.yml | 64 ------ .github/workflows/phpunit-mariadb.yml | 144 ------------- .github/workflows/phpunit-memcached.yml | 123 ----------- .github/workflows/phpunit-mysql.yml | 144 ------------- .github/workflows/phpunit-nodb.yml | 127 ----------- .github/workflows/phpunit-oci.yml | 140 ------------- .github/workflows/phpunit-pgsql.yml | 143 ------------- .github/workflows/phpunit-sqlite.yml | 127 ----------- .github/workflows/pr-feedback.yml | 29 --- .github/workflows/sftp.yml | 73 ------- .github/workflows/smb-kerberos.yml | 55 ----- .github/workflows/stale.yml | 33 --- .github/workflows/static-code-analysis.yml | 101 --------- .github/workflows/update-cacert-bundle.yml | 43 ---- .github/workflows/update-code-signing-crl.yml | 46 ---- .github/workflows/update-psalm-baseline.yml | 67 ------ 39 files changed, 1 insertion(+), 3723 deletions(-) delete mode 100644 .github/workflows/block-merge-eol.yml delete mode 100644 .github/workflows/block-merge-freeze.yml delete mode 100644 .github/workflows/command-compile.yml delete mode 100644 .github/workflows/command-pull-3rdparty.yml delete mode 100644 .github/workflows/command-rebase.yml delete mode 100644 .github/workflows/cypress.yml delete mode 100644 .github/workflows/dependabot-approve-merge.yml delete mode 100644 .github/workflows/files-external-s3.yml delete mode 100644 .github/workflows/fixup.yml delete mode 100644 .github/workflows/ftp.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/node-tests.yml delete mode 100644 .github/workflows/node.yml delete mode 100644 .github/workflows/npm-audit-fix.yml delete mode 100644 .github/workflows/object-storage-azure.yml delete mode 100644 .github/workflows/object-storage-swift.yml delete mode 100644 .github/workflows/openapi.yml delete mode 100644 .github/workflows/performance.yml delete mode 100644 .github/workflows/phpunit-32bits.yml delete mode 100644 .github/workflows/phpunit-mariadb.yml delete mode 100644 .github/workflows/phpunit-memcached.yml delete mode 100644 .github/workflows/phpunit-mysql.yml delete mode 100644 .github/workflows/phpunit-nodb.yml delete mode 100644 .github/workflows/phpunit-oci.yml delete mode 100644 .github/workflows/phpunit-pgsql.yml delete mode 100644 .github/workflows/phpunit-sqlite.yml delete mode 100644 .github/workflows/pr-feedback.yml delete mode 100644 .github/workflows/sftp.yml delete mode 100644 .github/workflows/smb-kerberos.yml delete mode 100644 .github/workflows/stale.yml delete mode 100644 .github/workflows/static-code-analysis.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-psalm-baseline.yml diff --git a/.drone.yml b/.drone.yml index 1e0a0c55e87d0..965f735fbfed9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -21,201 +21,6 @@ trigger: - pull_request - push ---- -kind: pipeline -name: litmus - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: litmus-v1 - image: ghcr.io/nextcloud/continuous-integration-litmus-php8.0:latest - commands: - - bash tests/travis/install.sh sqlite - - bash apps/dav/tests/travis/litmus-v1/script.sh -- name: litmus-v2 - image: ghcr.io/nextcloud/continuous-integration-litmus-php8.0:latest - commands: - - bash tests/travis/install.sh sqlite - - bash apps/dav/tests/travis/litmus-v2/script.sh - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: caldavtester-new-endpoint - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: caldavtester-new-endpoint - image: ghcr.io/nextcloud/continuous-integration-litmus-php8.0:latest - commands: - - bash tests/travis/install.sh sqlite - - bash apps/dav/tests/travis/caldav/install.sh - - bash apps/dav/tests/travis/caldav/script-new-endpoint.sh - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: caldavtester-old-endpoint - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: caldavtester-old-endpoint - image: ghcr.io/nextcloud/continuous-integration-litmus-php8.0:latest - commands: - - bash tests/travis/install.sh sqlite - - bash apps/dav/tests/travis/caldav/install.sh - - bash apps/dav/tests/travis/caldav/script-old-endpoint.sh - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: carddavtester-new-endpoint - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: carddavtester-new-endpoint - image: ghcr.io/nextcloud/continuous-integration-litmus-php8.0:latest - commands: - - bash tests/travis/install.sh sqlite - - bash apps/dav/tests/travis/carddav/install.sh - - bash apps/dav/tests/travis/carddav/script-new-endpoint.sh - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: carddavtester-old-endpoint - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: carddavtester-old-endpoint - image: ghcr.io/nextcloud/continuous-integration-litmus-php8.0:latest - commands: - - bash tests/travis/install.sh sqlite - - bash apps/dav/tests/travis/carddav/install.sh - - bash apps/dav/tests/travis/carddav/script-old-endpoint.sh - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: samba - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: sqlite-php8.0-samba-native - image: ghcr.io/nextcloud/continuous-integration-samba-native-php8.0:latest - commands: - - smbd -D -FS & - - ./autotest-external.sh sqlite smb-linux - - wget https://codecov.io/bash -O codecov.sh - - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-external-clover-sqlite.xml; fi" - - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-external-clover-sqlite.xml; fi" - - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-external-clover-sqlite-smb-linux.xml; fi" - - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-external-clover-sqlite-smb-linux.xml; fi" -# Temporarily disabled because it times out for unknown reasons 98% of the time -#- name: sqlite-php8.0-samba-non-native -# image: ghcr.io/nextcloud/continuous-integration-samba-non-native-php8.0:latest -# commands: -# - smbd -D -FS & -# - ./autotest-external.sh sqlite smb-linux -# - wget https://codecov.io/bash -O codecov.sh -# - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-external-clover-sqlite.xml; fi" -# - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-external-clover-sqlite.xml; fi" -# - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-external-clover-sqlite-smb-linux.xml; fi" -# - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-external-clover-sqlite-smb-linux.xml; fi" - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: sqlite-php8.0-webdav-apache - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: sqlite-php8.0-webdav-apache - image: ghcr.io/nextcloud/continuous-integration-webdav-apache-php8.0:latest - commands: - - apache2ctl start - - ./autotest-external.sh sqlite webdav-apachedrone - - wget https://codecov.io/bash -O codecov.sh - - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-external-clover-sqlite.xml; fi" - - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-external-clover-sqlite.xml; fi" - - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-external-clover-sqlite-webdav-apachedrone.xml; fi" - - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-external-clover-sqlite-webdav-apachedrone.xml; fi" - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - --- kind: signature -hmac: c0e95a282303de842a645a780b391964eb839e4cb11446e4cc9a19ef1a661383 +hmac: 605041c09acc7de600cfdc6681c38ed68de9798ba61e8f6635d23d8115ff09eb diff --git a/.github/workflows/block-merge-eol.yml b/.github/workflows/block-merge-eol.yml deleted file mode 100644 index 8c7653eac9e0a..0000000000000 --- a/.github/workflows/block-merge-eol.yml +++ /dev/null @@ -1,37 +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 - -name: Block merges for EOL - -on: pull_request - -permissions: - contents: read - -concurrency: - group: block-merge-eol-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - block-merges-eol: - name: Block merges for EOL branches - - # Only run on stableXX branches - if: startsWith( github.base_ref, 'stable') - runs-on: ubuntu-latest - - steps: - - name: Download updater config - run: curl https://raw.githubusercontent.com/nextcloud/updater_server/production/config/config.php --output config.php - - - name: Set server major version environment - run: | - # retrieve version number from branch reference - server_major=$(echo "${{ github.base_ref }}" | sed -En 's/stable//p') - echo "server_major=$server_major" >> $GITHUB_ENV - - - name: Checking if ${{ env.server_major }} is EOL - run: | - php -r 'echo json_encode(require_once "config.php");' | jq --arg version "${{ env.server_major }}" '.stable[$version]["100"].eol // .beta[$version]["100"].eol' | grep --silent -i 'false' diff --git a/.github/workflows/block-merge-freeze.yml b/.github/workflows/block-merge-freeze.yml deleted file mode 100644 index f2d029c9927c8..0000000000000 --- a/.github/workflows/block-merge-freeze.yml +++ /dev/null @@ -1,32 +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 - -name: Block merges during freezes - -on: - pull_request: - types: [opened, ready_for_review, reopened, synchronize] - -permissions: - contents: read - -concurrency: - group: block-merge-freeze-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - block-merges-during-freeze: - name: Block merges during freezes - - if: github.event.pull_request.draft == false - - runs-on: ubuntu-latest - - steps: - - name: Download version.php from ${{ github.base_ref }} - run: curl https://raw.githubusercontent.com/nextcloud/server/${{ github.base_ref }}/version.php --output version.php - - - name: Run check - run: cat version.php | grep 'OC_VersionString' | grep -i -v 'RC' diff --git a/.github/workflows/command-compile.yml b/.github/workflows/command-compile.yml deleted file mode 100644 index 8c0fbbc6be1b1..0000000000000 --- a/.github/workflows/command-compile.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: Compile Command -on: - issue_comment: - types: [created] - -jobs: - init: - runs-on: ubuntu-latest - - # 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 }} - - steps: - - name: Check actor permission - uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2 - with: - require: write - - - name: Add reaction on start - uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.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@7cef1df370a99dfd5bf896d50121390c96785db8 # v2 - 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@d97294d304604fa98a2600a6e2f916a84b596dc7 # v1 - id: comment-branch - - process: - runs-on: ubuntu-latest - needs: init - - steps: - - name: Restore cached git repository - uses: buildjet/cache@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3 - with: - path: .git - key: git-repo - - - name: Checkout ${{ needs.init.outputs.head_ref }} - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - 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@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 - id: package-engines-versions - with: - fallbackNode: '^20' - fallbackNpm: '^9' - - - name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3 - 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: Install dependencies & build - env: - CYPRESS_INSTALL_BINARY: 0 - PUPPETEER_SKIP_DOWNLOAD: true - run: | - npm ci - npm run build --if-present - - - name: Commit and push default - if: ${{ needs.init.outputs.arg1 != 'fixup' && needs.init.outputs.arg1 != 'amend' }} - run: | - git add ${{ github.workspace }}${{ needs.init.outputs.git_path }} - git commit --signoff -m 'chore(assets): Recompile assets' - git push origin ${{ needs.init.outputs.head_ref }} - - - name: Commit and push fixup - if: ${{ needs.init.outputs.arg1 == 'fixup' }} - run: | - git add ${{ github.workspace }}${{ needs.init.outputs.git_path }} - git commit --fixup=HEAD --signoff - git push origin ${{ needs.init.outputs.head_ref }} - - - name: Commit and push amend - if: ${{ needs.init.outputs.arg1 == 'amend' }} - run: | - git add ${{ github.workspace }}${{ needs.init.outputs.git_path }} - git commit --amend --no-edit --signoff - git push --force origin ${{ needs.init.outputs.head_ref }} - - - name: Add reaction on failure - uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.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 264eb3f99a585..0000000000000 --- a/.github/workflows/command-pull-3rdparty.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Update 3rdparty command - -on: - issue_comment: - types: created - -permissions: - contents: read - -jobs: - rebase: - runs-on: ubuntu-latest - permissions: - contents: none - - # 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@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.0.1 - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - repository: ${{ github.event.repository.full_name }} - comment-id: ${{ github.event.comment.id }} - reactions: "+1" - - - name: Init branch - uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v1 - id: comment-branch - - - name: Checkout ${{ steps.comment-branch.outputs.head_ref }} - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - fetch-depth: 0 - token: ${{ secrets.COMMAND_BOT_PAT }} - ref: ${{ steps.comment-branch.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: Pull 3rdparty - run: git submodule foreach 'if [ "$sm_path" == "3rdparty" ]; then git pull origin ${{ github.event.issue.pull_request.base.ref }}; fi' - - - name: Commit and push changes - run: | - git add 3rdparty - git commit -s -m "Update submodule 3rdparty to latest ${{ github.event.issue.pull_request.base.ref }}" - git push - - - name: Add reaction on failure - uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.0.1 - 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-rebase.yml b/.github/workflows/command-rebase.yml deleted file mode 100644 index 01d2e6dc1db5e..0000000000000 --- a/.github/workflows/command-rebase.yml +++ /dev/null @@ -1,51 +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 - -name: Rebase command - -on: - issue_comment: - types: created - -permissions: - contents: read - -jobs: - rebase: - runs-on: ubuntu-latest - permissions: - contents: none - - # On pull requests and if the comment starts with `/rebase` - if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase') - - steps: - - name: Add reaction on start - uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.0.1 - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - repository: ${{ github.event.repository.full_name }} - comment-id: ${{ github.event.comment.id }} - reaction-type: "+1" - - - name: Checkout the latest code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.2 - with: - fetch-depth: 0 - token: ${{ secrets.COMMAND_BOT_PAT }} - - - name: Automatic Rebase - uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8 - env: - GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} - - - name: Add reaction on failure - uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.0.1 - if: failure() - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - repository: ${{ github.event.repository.full_name }} - comment-id: ${{ github.event.comment.id }} - reaction-type: "-1" diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml deleted file mode 100644 index cc1d7c1da777d..0000000000000 --- a/.github/workflows/cypress.yml +++ /dev/null @@ -1,162 +0,0 @@ -name: Cypress - -on: pull_request - -concurrency: - group: cypress-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -env: - # Adjust APP_NAME if your repository name is different - APP_NAME: ${{ github.event.repository.name }} - # Server requires head_ref instead of base_ref, as we want to test the PR branch - BRANCH: ${{ github.head_ref || github.ref_name }} - -jobs: - init: - runs-on: ubuntu-latest - outputs: - nodeVersion: ${{ steps.versions.outputs.nodeVersion }} - npmVersion: ${{ steps.versions.outputs.npmVersion }} - - env: - PUPPETEER_SKIP_DOWNLOAD: true - - steps: - - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - # We need to checkout submodules for 3rdparty - submodules: true - - - name: Check composer.json - id: check_composer - uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2 - with: - files: "composer.json" - - - name: Install composer dependencies - if: steps.check_composer.outputs.files_exists == 'true' - run: composer install --no-dev - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 - id: versions - with: - fallbackNode: "^20" - fallbackNpm: "^9" - - - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: ${{ steps.versions.outputs.nodeVersion }} - - - name: Set up npm ${{ steps.versions.outputs.npmVersion }} - run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - - - name: Install node dependencies & build app - run: | - npm ci - TESTING=true npm run build --if-present - - - name: Show cypress version - run: npm run cypress:version - - - name: Save context - uses: buildjet/cache/save@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3 - with: - key: cypress-context-${{ github.run_id }} - path: ./ - - cypress: - runs-on: ubuntu-latest - needs: init - - strategy: - fail-fast: false - matrix: - # Run multiple copies of the current job in parallel - # Please increase the number or runners as your tests suite grows (0 based index for e2e tests) - containers: ["component", 0, 1, 2, 3, 4, 5] - # Hack as strategy.job-total includes the component and GitHub does not allow math expressions - # Always aling this number with the total of e2e runners (max. index + 1) - total-containers: [6] - - name: runner ${{ matrix.containers }} - - steps: - - name: Restore context - uses: buildjet/cache/restore@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3 - with: - fail-on-cache-miss: true - key: cypress-context-${{ github.run_id }} - path: ./ - - - name: Set up node ${{ needs.init.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: ${{ needs.init.outputs.nodeVersion }} - - - name: Set up npm ${{ needs.init.outputs.npmVersion }} - run: npm i -g npm@"${{ needs.init.outputs.npmVersion }}" - - - name: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} cypress tests - uses: cypress-io/github-action@ebe8b24c4428922d0f793a5c4c96853a633180e3 # v6.6.0 - with: - component: ${{ matrix.containers == 'component' }} - group: ${{ matrix.use-cypress-cloud && matrix.containers == 'component' && 'Run component' || matrix.use-cypress-cloud && 'Run E2E' || '' }} - # cypress env - ci-build-id: ${{ matrix.use-cypress-cloud && format('{0}-{1}', github.sha, github.run_number) || '' }} - tag: ${{ matrix.use-cypress-cloud && github.event_name || '' }} - env: - # Needs to be prefixed with CYPRESS_ - CYPRESS_BRANCH: ${{ env.BRANCH }} - # https://github.com/cypress-io/github-action/issues/124 - COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} - # Needed for some specific code workarounds - TESTING: true - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} - SPLIT: ${{ matrix.total-containers }} - SPLIT_INDEX: ${{ matrix.containers == 'component' && 0 || matrix.containers }} - - - name: Upload snapshots - uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0 - if: always() - with: - name: snapshots_${{ matrix.containers }} - path: cypress/snapshots - - - name: Extract NC logs - if: failure() && matrix.containers != 'component' - run: docker logs nextcloud-cypress-tests-${{ env.APP_NAME }} > nextcloud.log - - - name: Upload NC logs - uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0 - if: failure() && matrix.containers != 'component' - with: - name: nc_logs_${{ matrix.containers }} - path: nextcloud.log - - - name: Create data dir archive - if: failure() && matrix.containers != 'component' - run: docker exec nextcloud-cypress-tests-server tar -cvjf - data > data.tar - - - name: Upload data dir archive - uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0 - if: failure() && matrix.containers != 'component' - with: - name: nc_data_${{ matrix.containers }} - path: data.tar - - summary: - runs-on: ubuntu-latest - needs: [init, cypress] - - if: always() - - name: cypress-summary - - steps: - - name: Summary status - run: if ${{ needs.init.result != 'success' || ( needs.cypress.result != 'success' && needs.cypress.result != 'skipped' ) }}; then exit 1; fi diff --git a/.github/workflows/dependabot-approve-merge.yml b/.github/workflows/dependabot-approve-merge.yml deleted file mode 100644 index 9951547f76aec..0000000000000 --- a/.github/workflows/dependabot-approve-merge.yml +++ /dev/null @@ -1,40 +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 - -name: Dependabot - -on: - pull_request_target: - 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.actor == 'dependabot[bot]' - runs-on: ubuntu-latest - permissions: - # for hmarr/auto-approve-action to approve PRs - pull-requests: write - - steps: - # Github actions bot approve - - uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - - # Nextcloud bot approve and merge request - - uses: ahmadnassri/action-dependabot-auto-merge@45fc124d949b19b6b8bf6645b6c9d55f4f9ac61a # v2 - with: - target: minor - github-token: ${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }} diff --git a/.github/workflows/files-external-s3.yml b/.github/workflows/files-external-s3.yml deleted file mode 100644 index a46ab25591eb3..0000000000000 --- a/.github/workflows/files-external-s3.yml +++ /dev/null @@ -1,186 +0,0 @@ -name: PHPUnit files_external S3 -on: - pull_request: - schedule: - - cron: "5 2 * * *" - -concurrency: - group: files-external-s3-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - 'apps/files_external/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - '**.php' - - files-external-s3-minio: - runs-on: ubuntu-latest - needs: changes - - if: ${{ github.repository_owner != 'nextcloud-gmbh' && needs.changes.outputs.src != 'false' }} - - strategy: - matrix: - php-versions: ['8.0', '8.1', '8.2', '8.3'] - include: - - php-versions: '8.3' - coverage: true - - name: php${{ matrix.php-versions }}-s3 - - services: - minio: - image: bitnami/minio - env: - MINIO_ROOT_USER: nextcloud - MINIO_ROOT_PASSWORD: bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ= - MINIO_DEFAULT_BUCKETS: nextcloud - ports: - - "9000:9000" - - steps: - - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 - 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: ${{ matrix.coverage && 'xdebug' || 'none' }} - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Nextcloud - env: - OBJECT_STORE_KEY: nextcloud - OBJECT_STORE_SECRET: bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ= - run: | - composer install - ./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 - echo " 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 - - - name: Wait for S3 - run: | - sleep 10 - curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready - - - name: PHPUnit - run: composer run test:files_external -- \ - apps/files_external/tests/Storage/Amazons3Test.php \ - apps/files_external/tests/Storage/VersionedAmazonS3Test.php \ - ${{ matrix.coverage && ' --coverage-clover ./clover.xml' || '' }} - - - name: Upload code coverage - if: ${{ !cancelled() && matrix.coverage }} - uses: codecov/codecov-action@v3 - with: - files: ./clover.xml - flags: phpunit-files-external-s3 - - - name: S3 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-s3-localstack: - runs-on: ubuntu-latest - needs: changes - - if: ${{ github.repository_owner != 'nextcloud-gmbh' && needs.changes.outputs.src != 'false' }} - - strategy: - matrix: - php-versions: ['8.0', '8.1', '8.2', '8.3'] - include: - - php-versions: '8.3' - coverage: true - - name: php${{ matrix.php-versions }}-s3 - - services: - localstack: - env: - SERVICES: s3 - DEBUG: 1 - image: localstack/localstack - ports: - - "4566:4566" - - steps: - - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 - 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: ${{ matrix.coverage && 'xdebug' || 'none' }} - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Nextcloud - run: | - composer install - ./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 - echo " 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 - - - name: PHPUnit - run: composer run test:files_external -- \ - apps/files_external/tests/Storage/Amazons3Test.php \ - apps/files_external/tests/Storage/VersionedAmazonS3Test.php \ - ${{ matrix.coverage && ' --coverage-clover ./clover.xml' || '' }} - - - name: Upload code coverage - if: ${{ !cancelled() && matrix.coverage }} - uses: codecov/codecov-action@v3 - with: - files: ./clover.xml - flags: phpunit-files-external-s3 - - - name: S3 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 - - s3-external-summary: - runs-on: ubuntu-latest - needs: [changes, files-external-s3-minio, files-external-s3-localstack] - - if: always() - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.files-external-s3-minio.result != 'success' && needs.files-external-s3-localstack.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/fixup.yml b/.github/workflows/fixup.yml deleted file mode 100644 index 9548d19f2d5cd..0000000000000 --- a/.github/workflows/fixup.yml +++ /dev/null @@ -1,33 +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 - -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 - - steps: - - name: Run check - uses: skjnldsv/block-fixup-merge-action@42d26e1b536ce61e5cf467d65fb76caf4aa85acf # v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ftp.yml b/.github/workflows/ftp.yml deleted file mode 100644 index ffa2722d34207..0000000000000 --- a/.github/workflows/ftp.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: FTP unit tests -on: - pull_request: - paths: - - '.github/**' - - 'apps/files_external/**' - -concurrency: - group: ftp-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -env: - APP_NAME: files_external - -jobs: - ftp-tests: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - strategy: - # do not stop on another job's failure - fail-fast: false - matrix: - php-versions: ['8.0'] - ftpd: ['proftpd', 'vsftpd', 'pure-ftpd'] - - name: php${{ matrix.php-versions }}-${{ matrix.ftpd }} - - steps: - - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - - - name: Set up ftpd - run: | - sudo mkdir /tmp/ftp - sudo chmod -R 0777 /tmp/ftp - if [[ "${{ matrix.ftpd }}" == 'proftpd' ]]; then echo '$6$Q7V2n3q2GRVv5YeQ$/AhLu07H76Asojy7bxGXMY1caKLAbp5Vt82LOZYMkD/8uDzyMAEXwk0c1Bdz1DkBsk2Vh/9SF130mOPavRGMo.' > /tmp/secret.txt; fi - if [[ "${{ matrix.ftpd }}" == 'proftpd' ]]; then echo 'FTP_ROOT=/home/test' > $GITHUB_ENV; fi - if [[ "${{ matrix.ftpd }}" == 'proftpd' ]]; then 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; fi - if [[ "${{ matrix.ftpd }}" == 'vsftpd' ]]; then 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; fi - if [[ "${{ matrix.ftpd }}" == 'pure-ftpd' ]]; then 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; fi - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2 - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Nextcloud - run: | - composer install - 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 - ./occ app:enable --force ${{ env.APP_NAME }} - php -S localhost:8080 & - - name: smoketest ftp - run: | - php -r 'var_dump(file_put_contents("ftp://test:test@localhost${{ env.FTP_ROOT }}/ftp.txt", "asd"));' - php -r 'var_dump(file_get_contents("ftp://test:test@localhost${{ env.FTP_ROOT }}/ftp.txt"));' - php -r 'var_dump(mkdir("ftp://test:test@localhost${{ env.FTP_ROOT }}/asdads"));' - ls -l /tmp/ftp - [ -f /tmp/ftp/ftp.txt ] - - name: PHPUnit - run: | - echo " true,'host' => 'localhost','user' => 'test','password' => 'test', 'root' => '${{ env.FTP_ROOT }}'];" > apps/${{ env.APP_NAME }}/tests/config.ftp.php - composer run test:files_external apps/files_external/tests/Storage/FtpTest.php - - name: ftpd logs - if: always() - run: | - docker logs ftp - - ftp-summary: - runs-on: ubuntu-latest - needs: ftp-tests - - if: always() - - steps: - - name: Summary status - run: if ${{ needs.ftp-tests.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 618129c3de9b8..0000000000000 --- a/.github/workflows/integration-s3-primary.yml +++ /dev/null @@ -1,101 +0,0 @@ -name: S3 primary storage integration tests -on: - pull_request: - paths: - - '.github/workflows/**' - - '3rdparty/**' - - 'build/integration/**' - - '**/*.php' - - '**/lib/**' - - '**/tests/**' - - '**/vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - -concurrency: - group: integration-s3-primary-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - integration-s3-primary: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - strategy: - # do not stop on another job's failure - fail-fast: false - matrix: - php-versions: ['8.0'] - key: ['objectstore', 'objectstore_multibucket'] - - name: php${{ matrix.php-versions }}-${{ matrix.key }}-minio - - services: - redis: - image: ghcr.io/nextcloud/continuous-integration-redis:latest - options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 - ports: - - 6379:6379/tcp - minio: - image: bitnami/minio - env: - MINIO_ROOT_USER: nextcloud - MINIO_ROOT_PASSWORD: bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ= - MINIO_DEFAULT_BUCKETS: nextcloud - ports: - - "9000:9000" - - steps: - - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 - 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: Wait for S3 - run: | - sleep 10 - curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready - - - name: Set up Nextcloud - run: | - 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 - - - s3-primary-integration-summary: - runs-on: ubuntu-latest - needs: [integration-s3-primary] - - if: always() - - steps: - - name: Summary status - run: if ${{ needs.integration-s3-primary.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/integration-sqlite.yml b/.github/workflows/integration-sqlite.yml deleted file mode 100644 index de32836fc7c30..0000000000000 --- a/.github/workflows/integration-sqlite.yml +++ /dev/null @@ -1,167 +0,0 @@ -name: Integration sqlite - -on: - pull_request: - push: - branches: - - main - - master - - stable* - -permissions: - contents: read - -concurrency: - group: integration-sqlite-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest - - outputs: - # FIXME src: ${{ steps.changes.outputs.src}} - src: 'true' - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - 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-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' - - 'dav_features' - - 'features' - - 'federation_features' - - '--tags ~@large files_features' - - 'filesdrop_features' - - 'openldap_features' - - 'openldap_numerical_features' - - 'ldap_features' - - 'remoteapi_features' - - 'setup_features' - - 'sharees_features' - - 'sharing_features' - - 'videoverification_features' - - php-versions: ['8.2'] - spreed-versions: ['main'] - - services: - redis: - image: ghcr.io/nextcloud/continuous-integration-redis:latest - 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-7 - ports: - - 389:389 - env: - SLAPD_DOMAIN: nextcloud.ci - SLAPD_ORGANIZATION: Nextcloud - SLAPD_PASSWORD: admin - SLAPD_ADDITIONAL_MODULES: memberof - - steps: - - name: Checkout server - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - with: - submodules: true - - - name: Checkout Talk app - if: ${{ matrix.test-suite == 'videoverification_features' }} - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - with: - repository: nextcloud/spreed - path: apps/spreed - ref: ${{ matrix.spreed-versions }} - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 - 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 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up production dependencies - run: composer i --no-dev - - - name: Set up behat dependencies - working-directory: build/integration - run: composer i - - - 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 - ./occ config:system:set hashing_default_password --value=true --type=boolean - - - 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 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 - - summary: - permissions: - contents: none - runs-on: ubuntu-latest - 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 2e78287269d96..0000000000000 --- a/.github/workflows/lint-eslint.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 -# -# Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions -# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks - -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 - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - 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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 - id: versions - with: - fallbackNode: '^20' - fallbackNpm: '^9' - - - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - 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 - 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 ea04076e25bd1..0000000000000 --- a/.github/workflows/lint-php-cs.yml +++ /dev/null @@ -1,78 +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 - -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 - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - 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 - - name: PHP CS fixer lint - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Set up php - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 - with: - php-version: 8.1 - 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 - 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 6fcda6cd5ee77..0000000000000 --- a/.github/workflows/lint-php.yml +++ /dev/null @@ -1,82 +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 - -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 - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - 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.0", "8.1", "8.2", "8.3" ] - - name: php-lint - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 - with: - php-version: ${{ matrix.php-versions }} - 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 - 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/node-tests.yml b/.github/workflows/node-tests.yml deleted file mode 100644 index aae72d70fdde0..0000000000000 --- a/.github/workflows/node-tests.yml +++ /dev/null @@ -1,169 +0,0 @@ -name: Node tests - -on: - pull_request: - schedule: - - cron: "5 2 * * *" - -concurrency: - group: node-tests-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '**/__tests__/**' - - '**/__mocks__/**' - - '**/src/**' - - '**/appinfo/info.xml' - - 'package.json' - - 'package-lock.json' - - 'tsconfig.json' - - '**.js' - - '**.ts' - - '**.vue' - - '**.handlebars' - - versions: - runs-on: ubuntu-latest - needs: changes - - if: ${{ github.repository_owner != 'nextcloud-gmbh' && needs.changes.outputs.src != 'false' }} - - outputs: - nodeVersion: ${{ steps.versions.outputs.nodeVersion }} - npmVersion: ${{ steps.versions.outputs.npmVersion }} - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 - id: versions - with: - fallbackNode: '^20' - fallbackNpm: '^9' - - test: - runs-on: ubuntu-latest - needs: [versions, changes] - - if: ${{ needs.versions.result != 'failure' && needs.changes.outputs.src != 'false' }} - - env: - CYPRESS_INSTALL_BINARY: 0 - PUPPETEER_SKIP_DOWNLOAD: true - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - - name: Set up node ${{ needs.versions.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 - with: - node-version: ${{ needs.versions.outputs.nodeVersion }} - - - name: Set up npm ${{ needs.versions.outputs.npmVersion }} - run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}" - - - name: Install dependencies - run: npm ci - - - name: Show cypress version - run: npm run cypress:version - - - name: Test and process coverage - run: npm run test:coverage - - - name: Collect coverage - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 - with: - files: ./coverage/lcov.info - - jsunit: - runs-on: ubuntu-latest - needs: [versions, changes] - - if: ${{ needs.versions.result != 'failure' && needs.changes.outputs.src != 'false' }} - - env: - CYPRESS_INSTALL_BINARY: 0 - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - - name: Set up node ${{ needs.versions.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 - with: - node-version: ${{ needs.versions.outputs.nodeVersion }} - - - name: Set up npm ${{ needs.versions.outputs.npmVersion }} - run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}" - - - name: Install dependencies - run: npm ci - - - name: Show cypress version - run: npm run cypress:version - - - name: Test - run: npm run test:jsunit - - handlebars: - runs-on: ubuntu-latest - needs: [versions, changes] - - if: ${{ needs.versions.result != 'failure' && needs.changes.outputs.src != 'false' }} - - env: - CYPRESS_INSTALL_BINARY: 0 - PUPPETEER_SKIP_DOWNLOAD: true - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - - name: Set up node ${{ needs.versions.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 - with: - node-version: ${{ needs.versions.outputs.nodeVersion }} - - - name: Set up npm ${{ needs.versions.outputs.npmVersion }} - run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}" - - - name: Install dependencies - run: npm ci - - - name: Show cypress version - run: npm run cypress:version - - - name: Run compile - run: ./build/compile-handlebars-templates.sh - - summary: - permissions: - contents: none - runs-on: ubuntu-latest - needs: [changes, test, jsunit, handlebars] - - if: always() - - name: node-test-summary - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' && needs.jsunit.result != 'success' && needs.handlebars.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml deleted file mode 100644 index 813498404a703..0000000000000 --- a/.github/workflows/node.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 - -name: Node - -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 - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - 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@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.6.0 - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 - id: versions - with: - fallbackNode: '^20' - fallbackNpm: '^9' - - - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - 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 & build - env: - CYPRESS_INSTALL_BINARY: 0 - PUPPETEER_SKIP_DOWNLOAD: true - run: | - npm ci - npm run build --if-present - - - name: Check webpack 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 - 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/npm-audit-fix.yml b/.github/workflows/npm-audit-fix.yml deleted file mode 100644 index c8523f9417645..0000000000000 --- a/.github/workflows/npm-audit-fix.yml +++ /dev/null @@ -1,74 +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 - -name: Npm audit fix and compile - -on: - workflow_dispatch: - schedule: - # At 2:30 on Sundays - - cron: '30 2 * * 0' - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - branches: ["main", "master", "stable28", "stable27", "stable26"] - - name: npm-audit-fix-${{ matrix.branches }} - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.6.0 - with: - ref: ${{ matrix.branches }} - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 - id: versions - with: - fallbackNode: '^20' - fallbackNpm: '^9' - - - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - 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 - run: | - npm audit fix - - - name: Run npm ci and npm run build - if: always() - env: - CYPRESS_INSTALL_BINARY: 0 - PUPPETEER_SKIP_DOWNLOAD: true - run: | - npm ci - npm run build --if-present - - - name: Create Pull Request - if: always() - uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5 - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - commit-message: "chore(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: | - Auto-generated fix of npm audit - labels: | - dependencies - 3. to review diff --git a/.github/workflows/object-storage-azure.yml b/.github/workflows/object-storage-azure.yml deleted file mode 100644 index ef0e29b117bde..0000000000000 --- a/.github/workflows/object-storage-azure.yml +++ /dev/null @@ -1,125 +0,0 @@ -name: Object storage azure -on: - pull_request: - schedule: - - cron: "15 2 * * *" - -concurrency: - group: object-storage-azure-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/appinfo/**' - - '**/lib/**' - - '**/templates/**' - - '**/tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - '**.php' - - azure-primary-tests: - runs-on: ubuntu-latest - needs: changes - - if: ${{ github.repository_owner != 'nextcloud-gmbh' && needs.changes.outputs.src != 'false' }} - - strategy: - matrix: - php-versions: ['8.0', '8.1', '8.2', '8.3'] - include: - - php-versions: '8.3' - coverage: true - - name: php${{ matrix.php-versions }}-azure - - services: - azurite: - image: mcr.microsoft.com/azure-storage/azurite - env: - AZURITE_ACCOUNTS: nextcloud:bmV4dGNsb3Vk - ports: - - 10000:10000 - options: --health-cmd="nc 127.0.0.1 10000 -z" --health-interval=1s --health-retries=30 - - cache: - image: ghcr.io/nextcloud/continuous-integration-redis:latest - 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@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 - 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: ${{ matrix.coverage && 'xdebug' || 'none' }} - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Nextcloud - env: - OBJECT_STORE: azure - OBJECT_STORE_KEY: nextcloud - OBJECT_STORE_SECRET: bmV4dGNsb3Vk - 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 - php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0 - - - name: PHPUnit - env: - OBJECT_STORE: azure - OBJECT_STORE_KEY: nextcloud - OBJECT_STORE_SECRET: bmV4dGNsb3Vk - run: composer run test -- --group PRIMARY-azure ${{ matrix.coverage && ' --coverage-clover ./clover.xml' || '' }} - - - name: Upload code coverage - if: ${{ !cancelled() && matrix.coverage }} - uses: codecov/codecov-action@v3 - with: - files: ./clover.xml - flags: phpunit-azure - - - name: Azurite 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 - - azure-primary-summary: - runs-on: ubuntu-latest - needs: [changes, azure-primary-tests] - - if: always() - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.azure-primary-tests.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/object-storage-swift.yml b/.github/workflows/object-storage-swift.yml deleted file mode 100644 index d6ef067d2d075..0000000000000 --- a/.github/workflows/object-storage-swift.yml +++ /dev/null @@ -1,121 +0,0 @@ -name: Object storage Swift -on: - pull_request: - schedule: - - cron: "15 2 * * *" - -concurrency: - group: object-storage-swift-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/appinfo/**' - - '**/lib/**' - - '**/templates/**' - - '**/tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - '**.php' - - swift-primary-tests: - runs-on: ubuntu-latest - needs: changes - - if: ${{ github.repository_owner != 'nextcloud-gmbh' && needs.changes.outputs.src != 'false' }} - - strategy: - matrix: - php-versions: ['8.0', '8.1', '8.2', '8.3'] - include: - - php-versions: '8.3' - coverage: true - - name: php${{ matrix.php-versions }}-swift - - services: - cache: - image: ghcr.io/nextcloud/continuous-integration-redis:latest - ports: - - 6379:6379/tcp - options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 - - swift: - image: ghcr.io/cscfi/docker-keystone-swift - ports: - - 5000:5000 - - 8080:8080 - - steps: - - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 - 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: ${{ matrix.coverage && 'xdebug' || 'none' }} - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Nextcloud - env: - OBJECT_STORE: swift - OBJECT_STORE_SECRET: veryfast - 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 - php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0 - - - name: PHPUnit - env: - OBJECT_STORE: swift - OBJECT_STORE_SECRET: veryfast - run: composer run test -- --group PRIMARY-swift ${{ matrix.coverage && ' --coverage-clover ./clover.xml' || '' }} - - - name: Upload code coverage - if: ${{ !cancelled() && matrix.coverage }} - uses: codecov/codecov-action@v3 - with: - files: ./clover.xml - flags: phpunit-swift - - - name: Swift 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 - - swift-primary-summary: - runs-on: ubuntu-latest - needs: [changes,swift-primary-tests] - - if: always() - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.swift-primary-tests.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.yml deleted file mode 100644 index 5ed769d7de9c0..0000000000000 --- a/.github/workflows/openapi.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: OpenAPI - -on: - pull_request: - -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@b4ffde65f46336ab88eb53be808477a3936bae11 - - - name: Set up php - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2' - extensions: xml - coverage: none - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Composer install - 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 9999f4e187255..0000000000000 --- a/.github/workflows/performance.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: Performance testing -on: - pull_request: - -concurrency: - group: performance-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - performance-testing: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - strategy: - fail-fast: false - matrix: - php-versions: ['8.0'] - - name: performance-${{ matrix.php-versions }} - - steps: - - name: Checkout server before PR - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - ref: ${{ github.event.pull_request.base.ref }} - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2 - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd - 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@v0.1.2 - with: - blueprint: tests/blueprints/basic.toml - ref: ${{ github.event.pull_request.head.ref }} - - name: Run before measurements - uses: nextcloud/profiler@1e66a9de5f76a01e9d1db4f0153bcc1cbf989b3d - 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 - 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@1e66a9de5f76a01e9d1db4f0153bcc1cbf989b3d - 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@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 - with: - name: profiles - path: | - before.json - after.json - - - uses: actions/github-script@v7 - 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 deleted file mode 100644 index aa58c453ab8b1..0000000000000 --- a/.github/workflows/phpunit-32bits.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: PHPUnit 32bits - -on: - pull_request: - paths: - - 'version.php' - - '.github/workflows/phpunit-32bits.yml' - workflow_dispatch: - schedule: - - cron: "15 1 * * 1-6" - -permissions: - contents: read - -concurrency: - group: phpunit-32bits-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - phpunit-32bits: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - container: shivammathur/node:latest-i386 - - strategy: - matrix: - php-versions: ['8.0','8.3'] - - steps: - - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - - - name: Install tools - run: | - sudo apt-get update - sudo apt-get install -y ffmpeg imagemagick libmagickcore-6.q16-3-extra - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@72ae4ccbe57f82bbe08411e84e2130bd4ba1c10f #v2.25.5 - with: - php-version: ${{ matrix.php-versions }} - extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, openssl, pdo_sqlite, posix, sqlite, xml, zip, apcu - coverage: none - ini-file: development - ini-values: - apc.enabled=on, apc.enable_cli=on, disable_functions= # https://github.com/shivammathur/setup-php/discussions/573 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Nextcloud - env: - DB_PORT: 4444 - run: | - composer install - mkdir data - ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=rootpassword --admin-user admin --admin-pass admin - php -f index.php - - - name: PHPUnit - run: composer run test -- --exclude-group PRIMARY-azure,PRIMARY-s3,PRIMARY-swift,Memcached,Redis,RoutingWeirdness diff --git a/.github/workflows/phpunit-mariadb.yml b/.github/workflows/phpunit-mariadb.yml deleted file mode 100644 index b3ebdfe16e6cb..0000000000000 --- a/.github/workflows/phpunit-mariadb.yml +++ /dev/null @@ -1,144 +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 - -name: PHPUnit mariadb - -on: - pull_request: - schedule: - - cron: "5 2 * * *" - -permissions: - contents: read - -concurrency: - group: phpunit-mariadb-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/appinfo/**' - - '**/lib/**' - - '**/templates/**' - - '**/tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - '**.php' - - phpunit-mariadb: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - strategy: - matrix: - php-versions: ['8.0'] - mariadb-versions: ['10.3', '10.4', '10.5', '10.6', '10.11'] - include: - - php-versions: '8.3' - mariadb-versions: '10.6' - coverage: true - - name: MariaDB ${{ matrix.mariadb-versions }} (PHP ${{ matrix.php-versions }}) - database tests - - services: - cache: - image: ghcr.io/nextcloud/continuous-integration-redis:latest - ports: - - 6379:6379/tcp - options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 - - mariadb: - image: mariadb:${{ matrix.mariadb-versions }} - ports: - - 4444:3306/tcp - env: - MYSQL_ROOT_PASSWORD: rootpassword - MYSQL_USER: oc_autotest - MYSQL_PASSWORD: nextcloud - MYSQL_DATABASE: oc_autotest - options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5 - - steps: - - name: Checkout server - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 - 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, mysql, pdo_mysql - coverage: ${{ matrix.coverage && 'xdebug' || 'none' }} - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up dependencies - run: composer i - - - name: Enable ONLY_FULL_GROUP_BY MySQL option - run: | - echo "SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'));" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword - echo "SELECT @@sql_mode;" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword - - - name: Set up Nextcloud - env: - DB_PORT: 4444 - run: | - mkdir data - cp tests/redis.config.php config/ - cp tests/preseed-config.php config/config.php - ./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin - php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0 - - - name: PHPUnit - run: composer run test:db ${{ matrix.coverage && ' -- --coverage-clover ./clover.db.xml' || '' }} - - - name: Upload db code coverage - if: ${{ !cancelled() && matrix.coverage }} - uses: codecov/codecov-action@v3 - with: - files: ./clover.db.xml - flags: phpunit-mariadb - - - name: Print logs - if: always() - run: | - cat data/nextcloud.log - - summary: - permissions: - contents: none - runs-on: ubuntu-latest - needs: [changes, phpunit-mariadb] - - if: always() - - name: phpunit-mariadb-summary - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-mariadb.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/phpunit-memcached.yml b/.github/workflows/phpunit-memcached.yml deleted file mode 100644 index 9ec788b31eb6d..0000000000000 --- a/.github/workflows/phpunit-memcached.yml +++ /dev/null @@ -1,123 +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 - -name: PHPUnit memcached - -on: - pull_request: - schedule: - - cron: "5 2 * * *" - -permissions: - contents: read - -concurrency: - group: phpunit-memcached-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/appinfo/**' - - '**/lib/**' - - '**/templates/**' - - '**/tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - '**.php' - - phpunit-memcached: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - strategy: - matrix: - php-versions: ['8.0', '8.1', '8.2', '8.3'] - include: - - php-versions: '8.2' - coverage: true - - name: Memcached (PHP ${{ matrix.php-versions }}) - - services: - memcached: - image: ghcr.io/nextcloud/continuous-integration-redis:latest - ports: - - 11212:11212/tcp - - 11212:11212/udp - - steps: - - name: Checkout server - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2 - 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, memcached, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite - coverage: ${{ matrix.coverage && 'xdebug' || 'none' }} - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up dependencies - run: composer i - - - name: Set up Nextcloud - run: | - mkdir data - cp tests/preseed-config.php config/config.php - ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin - php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0 - - - name: PHPUnit memcached tests - run: composer run test -- --group Memcache,Memcached ${{ matrix.coverage && '--coverage-clover ./clover.xml' || '' }} - - - name: Upload code coverage - if: ${{ !cancelled() && matrix.coverage }} - uses: codecov/codecov-action@v3 - with: - files: ./clover.xml - flags: phpunit-memcached - - - name: Print logs - if: always() - run: | - cat data/nextcloud.log - - summary: - permissions: - contents: none - runs-on: ubuntu-latest - needs: [changes, phpunit-memcached] - - if: always() - - name: phpunit-memcached-summary - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-memcached.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml deleted file mode 100644 index 1bf33ca51f753..0000000000000 --- a/.github/workflows/phpunit-mysql.yml +++ /dev/null @@ -1,144 +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 - -name: PHPUnit mysql - -on: - pull_request: - schedule: - - cron: "5 2 * * *" - -permissions: - contents: read - -concurrency: - group: phpunit-mysql-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src }} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/appinfo/**' - - '**/lib/**' - - '**/templates/**' - - '**/tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - '**.php' - - phpunit-mysql: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - strategy: - matrix: - php-versions: ['8.0'] - mysql-versions: ['8.0', '8.1'] - include: - - mysql-versions: '8.1' - php-versions: '8.3' - coverage: true - - name: MySQL ${{ matrix.mysql-versions }} (PHP ${{ matrix.php-versions }}) - database tests - - services: - cache: - image: ghcr.io/nextcloud/continuous-integration-redis:latest - ports: - - 6379:6379/tcp - options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 - - mysql: - image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest - ports: - - 4444:3306/tcp - env: - MYSQL_ROOT_PASSWORD: rootpassword - MYSQL_USER: oc_autotest - MYSQL_PASSWORD: nextcloud - MYSQL_DATABASE: oc_autotest - options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5 - - steps: - - name: Checkout server - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 - 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, mysql, pdo_mysql - coverage: ${{ matrix.coverage && 'xdebug' || 'none' }} - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up dependencies - run: composer i - - - name: Enable ONLY_FULL_GROUP_BY MySQL option - run: | - echo "SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'));" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword - echo "SELECT @@sql_mode;" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword - - - name: Set up Nextcloud - env: - DB_PORT: 4444 - run: | - mkdir data - cp tests/redis.config.php config/ - cp tests/preseed-config.php config/config.php - ./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin - php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0 - - - name: PHPUnit - run: composer run test:db ${{ matrix.coverage && ' -- --coverage-clover ./clover.db.xml' || '' }} - - - name: Upload db code coverage - if: ${{ !cancelled() && matrix.coverage }} - uses: codecov/codecov-action@v3 - with: - files: ./clover.db.xml - flags: phpunit-mysql - - - name: Print logs - if: always() - run: | - cat data/nextcloud.log - - summary: - permissions: - contents: none - runs-on: ubuntu-latest - needs: [changes, phpunit-mysql] - - if: always() - - name: phpunit-mysql-summary - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-mysql.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/phpunit-nodb.yml b/.github/workflows/phpunit-nodb.yml deleted file mode 100644 index 2454da43b07d1..0000000000000 --- a/.github/workflows/phpunit-nodb.yml +++ /dev/null @@ -1,127 +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 - -# This is the testsuite running all non-database agnostic unit tests -name: PHPUnit nodb - -on: - pull_request: - schedule: - - cron: "5 2 * * *" - -permissions: - contents: read - -concurrency: - group: phpunit-nodb-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src }} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/appinfo/**' - - '**/lib/**' - - '**/templates/**' - - '**/tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - '**.php' - - phpunit-nodb: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - strategy: - matrix: - php-versions: ['8.0', '8.1', '8.2', '8.3'] - include: - - php-versions: '8.2' - coverage: true - - name: No DB unit tests (PHP ${{ matrix.php-versions }}) - - services: - cache: - image: ghcr.io/nextcloud/continuous-integration-redis:latest - 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@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2 - 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, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite - coverage: ${{ matrix.coverage && 'xdebug' || 'none' }} - ini-file: development - # Required for tests that use pcntl - ini-values: disable_functions="" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up dependencies - run: composer i - - - name: Set up Nextcloud - run: | - mkdir data - cp tests/redis.config.php config/ - cp tests/preseed-config.php config/config.php - ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin - php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0 - - - name: PHPUnit nodb testsuite - run: composer run test -- --exclude-group DB,SLOWDB ${{ matrix.coverage && ' --coverage-clover ./clover.nodb.xml' || '' }} - - - name: Upload nodb code coverage - if: ${{ !cancelled() && matrix.coverage }} - uses: codecov/codecov-action@v3 - with: - files: ./clover.nodb.xml - flags: phpunit-nodb - - - name: Print logs - if: always() - run: | - cat data/nextcloud.log - - summary: - permissions: - contents: none - runs-on: ubuntu-latest - needs: [changes, phpunit-nodb] - - if: always() - - name: phpunit-nodb-summary - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-nodb.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml deleted file mode 100644 index e24a0dd899059..0000000000000 --- a/.github/workflows/phpunit-oci.yml +++ /dev/null @@ -1,140 +0,0 @@ -name: PHPUnit oci - -on: - pull_request: - schedule: - - cron: "5 2 * * *" - -permissions: - contents: read - -concurrency: - group: phpunit-oci-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src }} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/appinfo/**' - - '**/lib/**' - - '**/templates/**' - - '**/tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - '**.php' - - phpunit-oci: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - strategy: - matrix: - oracle-versions: ['11'] - php-versions: ['8.0', '8.1', '8.2', '8.3'] - include: - - php-versions: '8.3' - coverage: true - - name: Oracle ${{ matrix.oracle-versions }} (PHP ${{ matrix.php-versions }}) - database tests - - services: - cache: - image: ghcr.io/nextcloud/continuous-integration-redis:latest - ports: - - 6379:6379/tcp - options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 - - oracle: - image: ghcr.io/gvenzl/oracle-xe:${{ matrix.oracle-versions }} - - # Provide passwords and other environment variables to container - env: - ORACLE_RANDOM_PASSWORD: true - APP_USER: oc_autotest - APP_USER_PASSWORD: nextcloud - - # Forward Oracle port - ports: - - 4444:1521/tcp - - # Provide healthcheck script options for startup - options: >- - --health-cmd healthcheck.sh - --health-interval 10s - --health-timeout 5s - --health-retries 10 - - steps: - - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 - 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, oci8 - coverage: ${{ matrix.coverage && 'xdebug' || 'none' }} - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up dependencies - run: composer i - - - name: Set up Nextcloud - env: - DB_PORT: 4444 - run: | - mkdir data - cp tests/redis.config.php config/ - cp tests/preseed-config.php config/config.php - ./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=oc_autotest --database-pass=nextcloud --admin-user admin --admin-pass admin - php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0 - - - name: PHPUnit - run: composer run test:db ${{ matrix.coverage && ' -- --coverage-clover ./clover.db.xml' || '' }} - - - name: Upload db code coverage - if: ${{ !cancelled() && matrix.coverage }} - uses: codecov/codecov-action@v3 - with: - files: ./clover.db.xml - flags: phpunit-oci - - - name: Run repair steps - run: | - ./occ maintenance:repair --include-expensive - - summary: - permissions: - contents: none - runs-on: ubuntu-latest - needs: [changes, phpunit-oci] - - if: always() - - name: phpunit-oci-summary - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-oci.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml deleted file mode 100644 index 94d5562cd6e33..0000000000000 --- a/.github/workflows/phpunit-pgsql.yml +++ /dev/null @@ -1,143 +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 - -name: PHPUnit pgsql - -on: - pull_request: - schedule: - - cron: "5 2 * * *" - -permissions: - contents: read - -concurrency: - group: phpunit-pgsql-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src }} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/appinfo/**' - - '**/lib/**' - - '**/templates/**' - - '**/tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - '**.php' - - phpunit-pgsql: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - strategy: - matrix: - php-versions: ['8.0'] - # To keep the matrix smaller we ignore PostgreSQL '11', '13', '14' as we already test 10 and 15 as lower and upper bound - postgres-versions: ['10', '15', '16'] - include: - - php-versions: '8.3' - postgres-versions: '15' - coverage: true - - name: PostgreSQL ${{ matrix.postgres-versions }} (PHP ${{ matrix.php-versions }}) - database tests - - services: - cache: - image: ghcr.io/nextcloud/continuous-integration-redis:latest - ports: - - 6379:6379/tcp - options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 - - postgres: - image: ghcr.io/nextcloud/continuous-integration-postgres-${{ matrix.postgres-versions }}:latest - ports: - - 4444:5432/tcp - env: - POSTGRES_USER: root - POSTGRES_PASSWORD: rootpassword - POSTGRES_DB: nextcloud - options: --mount type=tmpfs,destination=/var/lib/postgresql/data --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5 - - steps: - - name: Checkout server - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 - 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, pgsql, pdo_pgsql - coverage: ${{ matrix.coverage && 'xdebug' || 'none' }} - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up dependencies - run: composer i - - - name: Set up Nextcloud - env: - DB_PORT: 4444 - run: | - mkdir data - cp tests/redis.config.php config/ - cp tests/preseed-config.php config/config.php - ./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin - php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0 - - - name: PHPUnit database tests - run: composer run test:db ${{ matrix.coverage && ' -- --coverage-clover ./clover.db.xml' || '' }} - - - name: Upload db code coverage - if: ${{ !cancelled() && matrix.coverage }} - uses: codecov/codecov-action@v3 - with: - files: ./clover.db.xml - flags: phpunit-postgres - - - name: Run repair steps - run: | - ./occ maintenance:repair --include-expensive - - - name: Print logs - if: always() - run: | - cat data/nextcloud.log - - summary: - permissions: - contents: none - runs-on: ubuntu-latest - needs: [changes, phpunit-pgsql] - - if: always() - - name: phpunit-pgsql-summary - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-pgsql.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml deleted file mode 100644 index fa9728c2a5355..0000000000000 --- a/.github/workflows/phpunit-sqlite.yml +++ /dev/null @@ -1,127 +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 - -name: PHPUnit sqlite - -on: - pull_request: - schedule: - - cron: "5 2 * * *" - -permissions: - contents: read - -concurrency: - group: phpunit-sqlite-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src }} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - '3rdparty/**' - - '**/appinfo/**' - - '**/lib/**' - - '**/templates/**' - - '**/tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - '**.php' - - phpunit-sqlite: - runs-on: ubuntu-latest - - needs: changes - if: needs.changes.outputs.src != 'false' - - strategy: - matrix: - php-versions: ['8.0', '8.1', '8.2', '8.3'] - include: - - php-versions: '8.1' - coverage: true - - name: SQLite (PHP ${{ matrix.php-versions }}) - - services: - cache: - image: ghcr.io/nextcloud/continuous-integration-redis:latest - 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@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2 - 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: ${{ matrix.coverage && 'xdebug' || 'none' }} - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up dependencies - run: composer i - - - name: Set up Nextcloud - run: | - mkdir data - cp tests/redis.config.php config/ - cp tests/preseed-config.php config/config.php - ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin - php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0 - - - name: Nextcloud debug information - run: ./occ app:list && echo "======= System config =======" && ./occ config:list system - - - name: PHPUnit database tests - run: composer run test:db ${{ matrix.coverage && ' -- --coverage-clover ./clover.db.xml' || '' }} - - - name: Upload db code coverage - if: ${{ !cancelled() && matrix.coverage }} - uses: codecov/codecov-action@v3 - with: - files: ./clover.db.xml - flags: phpunit-sqlite - - - name: Print logs - if: always() - run: | - cat data/nextcloud.log - - summary: - permissions: - contents: none - runs-on: ubuntu-latest - needs: [changes, phpunit-sqlite] - - if: always() - - name: phpunit-sqlite-summary - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-sqlite.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 ea40f79433618..0000000000000 --- a/.github/workflows/pr-feedback.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: 'Ask for feedback on PRs' -on: - schedule: - - cron: '30 1 * * *' - -jobs: - pr-feedback: - runs-on: ubuntu-22.04 - steps: - - name: The get-github-handles-from-website action - uses: marcelklehr/get-github-handles-from-website-action@a739600f6b91da4957f51db0792697afbb2f143c # v1.0.0 - id: scrape - with: - website: 'https://nextcloud.com/team/' - - uses: marcelklehr/pr-feedback-action@601109aa729eb4c8d6d0ece7567b9d4901db4aef - 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 reviewing 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 reviewing 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! - days-before-feedback: 14 - start-date: "2023-07-10" - exempt-authors: "${{ steps.scrape.outputs.users }}" - exempt-bots: true diff --git a/.github/workflows/sftp.yml b/.github/workflows/sftp.yml deleted file mode 100644 index d1f8a60c6a11f..0000000000000 --- a/.github/workflows/sftp.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: SFTP unit tests -on: - pull_request: - paths: - - 'apps/files_external/**' - -env: - APP_NAME: files_external - -concurrency: - group: sftp-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - sftp-tests: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - strategy: - # do not stop on another job's failure - fail-fast: false - matrix: - php-versions: ['8.0'] - sftpd: ['openssh'] - - name: php${{ matrix.php-versions }}-${{ matrix.sftpd }} - - steps: - - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - - - name: Set up sftpd - run: | - sudo mkdir /tmp/sftp - sudo chown -R 0777 /tmp/sftp - if [[ "${{ matrix.sftpd }}" == 'openssh' ]]; then docker run -p 2222:22 --name sftp -d -v /tmp/sftp:/home/test atmoz/sftp "test:test:::data"; fi - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2 - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Nextcloud - run: | - composer install - 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 - ./occ app:enable --force ${{ env.APP_NAME }} - php -S localhost:8080 & - - name: PHPUnit - run: | - echo " true, 'host' => 'localhost:2222','user' => 'test','password' => 'test', 'root' => 'data'];" > apps/${{ env.APP_NAME }}/tests/config.sftp.php - composer run test:files_external apps/files_external/tests/Storage/SftpTest.php - - name: sftpd logs - if: always() - run: | - ls -l /tmp/sftp - docker logs sftp - - sftp-summary: - runs-on: ubuntu-latest - needs: sftp-tests - - if: always() - - steps: - - name: Summary status - run: if ${{ needs.sftp-tests.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/smb-kerberos.yml b/.github/workflows/smb-kerberos.yml deleted file mode 100644 index d52b85d045f28..0000000000000 --- a/.github/workflows/smb-kerberos.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Samba Kerberos SSO -on: - pull_request: - paths: - - 'apps/files_external/**' - - '.github/workflows/smb-kerberos.yml' - -concurrency: - group: smb-kerberos-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - smb-kerberos-tests: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - name: smb-kerberos-sso - - steps: - - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - - name: Checkout user_saml - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - repository: nextcloud/user_saml - path: apps/user_saml - - name: Pull images - run: | - docker pull ghcr.io/icewind1991/samba-krb-test-dc - docker pull ghcr.io/icewind1991/samba-krb-test-apache - 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 icewind1991/samba-krb-test-apache - 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 - if: failure() - 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/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index ec911455f61e0..0000000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Close stale issues - -on: - workflow_dispatch: - schedule: - - cron: "0 0 * * *" - -jobs: - stale: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - permissions: - issues: write - - steps: - - uses: actions/stale@v9 - 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' - labels-to-remove-when-unstale: 'needs info,stale' - exempt-issue-labels: '1. to develop,2. developing,3. to review,4. to release,security' - days-before-stale: 30 - days-before-close: 14 - # debug-only: true - diff --git a/.github/workflows/static-code-analysis.yml b/.github/workflows/static-code-analysis.yml deleted file mode 100644 index 01f30f2574cc5..0000000000000 --- a/.github/workflows/static-code-analysis.yml +++ /dev/null @@ -1,101 +0,0 @@ -name: Psalm static code analysis - -on: - pull_request: - -concurrency: - group: static-code-analysis-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - static-code-analysis: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - - - name: Set up php - uses: shivammathur/setup-php@v2 - with: - php-version: '8.0' - extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,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:ci -- --monochrome --no-progress --output-format=github --update-baseline --report=results.sarif - - - name: Show potential changes in Psalm baseline - if: always() - run: git diff -- . ':!lib/composer' - - - name: Upload Analysis results to GitHub - if: always() - uses: github/codeql-action/upload-sarif@v3 - with: - sarif_file: results.sarif - - static-code-analysis-security: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - - - name: Set up php - uses: shivammathur/setup-php@master - with: - php-version: '8.0' - extensions: ctype,curl,dom,fileinfo,ftp,gd,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:ci -- --monochrome --no-progress --output-format=github --report=results.sarif --taint-analysis - - - name: Upload Security Analysis results to GitHub - if: always() - uses: github/codeql-action/upload-sarif@v3 - with: - sarif_file: results.sarif - - static-code-analysis-ocp: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - submodules: true - - - name: Set up php - uses: shivammathur/setup-php@v2 - with: - php-version: '8.0' - extensions: ctype,curl,dom,fileinfo,gd,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:ci -- -c psalm-ocp.xml --monochrome --no-progress --output-format=github --update-baseline - - - name: Show potential changes in Psalm baseline - if: always() - run: git diff -- . ':!lib/composer' diff --git a/.github/workflows/update-cacert-bundle.yml b/.github/workflows/update-cacert-bundle.yml deleted file mode 100644 index 1fbd9ef9c7126..0000000000000 --- a/.github/workflows/update-cacert-bundle.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Update CA certificate bundle - -on: - workflow_dispatch: - schedule: - - cron: "5 2 * * *" - -jobs: - update-ca-certificate-bundle: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - branches: ["master", "stable28", "stable27", "stable26", "stable25", "stable24", "stable23", "stable22"] - - name: update-ca-certificate-bundle-${{ matrix.branches }} - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - 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@153407881ec5c347639a548ade7d8ad1d6740e38 - 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 148546c7a3ea3..0000000000000 --- a/.github/workflows/update-code-signing-crl.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Update code signing revocation list - -on: - workflow_dispatch: - schedule: - - cron: "5 2 * * *" - -jobs: - update-code-signing-crl: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - branches: ["master", "stable28", "stable27", "stable26", "stable25", "stable24", "stable23", "stable22"] - - name: update-code-signing-crl-${{ matrix.branches }} - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - 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@153407881ec5c347639a548ade7d8ad1d6740e38 - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - commit-message: "fix(security): Update code signing revocation list" - 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-psalm-baseline.yml b/.github/workflows/update-psalm-baseline.yml deleted file mode 100644 index a31128042a192..0000000000000 --- a/.github/workflows/update-psalm-baseline.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Update Psalm baseline - -on: - workflow_dispatch: - schedule: - - cron: "5 2 * * *" - -jobs: - update-psalm-baseline: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - strategy: - fail-fast: false - matrix: - branches: ["master", "stable28", "stable27", "stable26"] - - name: update-psalm-baseline-${{ matrix.branches }} - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - ref: ${{ matrix.branches }} - submodules: true - - - name: Set up php - uses: shivammathur/setup-php@v2 - with: - php-version: '8.0' - extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip - coverage: none - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Composer install - run: composer install - - - name: Psalm - run: composer run psalm -- --monochrome --no-progress --output-format=text --update-baseline - continue-on-error: true - - - name: Psalm OCP - run: composer run psalm -- -c psalm-ocp.xml --monochrome --no-progress --output-format=github --update-baseline - continue-on-error: true - - - name: Reset composer - run: | - git clean -f lib/composer - git checkout composer.json composer.lock lib/composer - - - name: Create Pull Request - uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - commit-message: Update psalm baseline - committer: GitHub - author: nextcloud-command - signoff: true - branch: automated/noid/${{ matrix.branches }}-update-psalm-baseline - title: "[${{ matrix.branches }}] Update psalm-baseline.xml" - body: | - Auto-generated update psalm-baseline.xml with fixed psalm warnings - labels: | - automated pr - 3. to review - team-reviewers: server-backend