Skip to content

Commit

Permalink
Merge branch 'nextcloud:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibautPlg authored Mar 15, 2024
2 parents e6bbaad + df1cd1b commit 88fd204
Show file tree
Hide file tree
Showing 1,409 changed files with 31,170 additions and 14,108 deletions.
42 changes: 1 addition & 41 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,46 +122,6 @@ trigger:
- 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: signature
hmac: e34c8c2ca36355a8dcaf01c7bd14c53bd42d25a4d631533e2c8109e2690c2a98
hmac: f1a7a4774aef02c37a06ec6189d0acfefd847b66661ac4f6aab243f12f979158
10 changes: 5 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
/apps/workflowengine/appinfo/info.xml @blizzz @juliushaertl

# Frontend expertise
/apps/files/src @skjnldsv
/apps/files_external/src @skjnldsv
/apps/files_reminders/src @skjnldsv
/apps/files_sharing/src/actions @skjnldsv
/apps/files_trashbin/src @skjnldsv
/apps/files/src* @skjnldsv
/apps/files_external/src* @skjnldsv
/apps/files_reminders/src* @skjnldsv
/apps/files_sharing/src/actions* @skjnldsv
/apps/files_trashbin/src* @skjnldsv

# Security team
/resources/codesigning @mgallien @miaulalala @nickvergessen
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Check composer.json
id: check_composer
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
with:
files: "composer.json"

Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
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
uses: cypress-io/github-action@1b70233146622b69e789ccdd4f9452adc638d25a # v6.6.1
with:
component: ${{ matrix.containers == 'component' }}
group: ${{ matrix.use-cypress-cloud && matrix.containers == 'component' && 'Run component' || matrix.use-cypress-cloud && 'Run E2E' || '' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/files-external-ftp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./clover.xml
flags: phpunit-files-external-ftp
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/files-external-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./clover.xml
flags: phpunit-files-external-s3
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./clover.xml
flags: phpunit-files-external-s3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/files-external-sftp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./clover.xml
flags: phpunit-files-external-sftp
Expand Down
108 changes: 108 additions & 0 deletions .github/workflows/files-external-smb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: PHPUnit files_external SMB
on:
pull_request:
schedule:
- cron: "5 2 * * *"

concurrency:
group: files-external-smb-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest-low

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- '3rdparty/**'
- 'apps/files_external/**'
- 'vendor/**'
- 'vendor-bin/**'
- 'composer.json'
- 'composer.lock'
- '**.php'
files-external-smb:
runs-on: ubuntu-latest
needs: changes

if: ${{ github.repository_owner != 'nextcloud-gmbh' && needs.changes.outputs.src != 'false' }}

strategy:
matrix:
php-versions: ['8.0', '8.3']
include:
- php-versions: '8.0'
coverage: ${{ github.event_name != 'pull_request' }}

name: php${{ matrix.php-versions }}-smb

services:
samba:
image: ghcr.io/nextcloud/continuous-integration-samba:latest
ports:
- 445:445

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: ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, smbclient, sqlite, pdo_sqlite
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up smbclient
# This is needed as icewind/smb php library for notify
run: sudo apt-get install -y smbclient

- 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 config:system:set --value true --type boolean allow_local_remote_servers
./occ app:enable --force files_external
echo "<?php return ['run'=>true, 'host'=>'localhost', 'user'=>'test', 'password'=>'test', 'root'=>'', 'share'=>'public'];" > apps/files_external/tests/config.smb.php
- name: Wait for smb
run: |
apps/files_external/tests/env/wait-for-connection 127.0.0.1 445 60
- name: PHPUnit
run: composer run test:files_external -- --verbose \
apps/files_external/tests/Storage/SmbTest.php \
${{ matrix.coverage && ' --coverage-clover ./clover.xml' || '' }}

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@4fe8c5f003fae66aa5ebb77cfd3e7bfbbda0b6b0 # v3.1.5
with:
files: ./clover.xml
flags: phpunit-files-external-smb

files-external-smb-summary:
runs-on: ubuntu-latest-low
needs: [changes, files-external-smb]

if: always()

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.files-external-smb.result != 'success' }}; then exit 1; fi
2 changes: 1 addition & 1 deletion .github/workflows/files-external-webdav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@4fe8c5f003fae66aa5ebb77cfd3e7bfbbda0b6b0 # v3.1.5
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6
with:
files: ./clover.xml
flags: phpunit-files-external-webdav
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/files-external.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: PHPUnit files_external generic
on:
pull_request:
schedule:
- cron: "5 2 * * *"

concurrency:
group: files-external-generic-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest-low

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- '3rdparty/**'
- 'apps/files_external/**'
- 'vendor/**'
- 'vendor-bin/**'
- 'composer.json'
- 'composer.lock'
files-external-generic:
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.2'
coverage: ${{ github.event_name != 'pull_request' }}

name: php${{ matrix.php-versions }}-generic

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
- name: PHPUnit
run: composer run test:files_external \
${{ matrix.coverage && ' --coverage-clover ./clover.xml' || '' }}

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4
with:
files: ./clover.xml
flags: phpunit-files-external-generic

files-external-summary:
runs-on: ubuntu-latest-low
needs: [changes, files-external-generic ]

if: always()

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.files-external-generic.result != 'success' }}; then exit 1; fi
2 changes: 1 addition & 1 deletion .github/workflows/node-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
run: npm run test:coverage

- name: Collect coverage
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6
with:
files: ./coverage/lcov.info

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-audit-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Create Pull Request
if: always()
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5
uses: peter-evans/create-pull-request@a4f52f8033a6168103c2538976c07b467e8163bc # v5
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: "chore(deps): fix npm audit"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/object-storage-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./clover.xml
flags: phpunit-azure
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/object-storage-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./clover.xml
flags: phpunit-s3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/object-storage-swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./clover.xml
flags: phpunit-swift
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:

- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./clover.db.xml
flags: phpunit-mariadb
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-memcached.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./clover.xml
flags: phpunit-memcached
Expand Down
Loading

0 comments on commit 88fd204

Please sign in to comment.