From db0b8f59c6697410381b6df323607764c1baab0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 17 May 2022 17:57:57 +0200 Subject: [PATCH 01/15] Add 8.2 lint and phpunit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/phpunit-mysql.yml | 120 ++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 .github/workflows/phpunit-mysql.yml diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml new file mode 100644 index 0000000000000..ec0de4cb3ed2a --- /dev/null +++ b/.github/workflows/phpunit-mysql.yml @@ -0,0 +1,120 @@ +# 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 + +on: + pull_request: + push: + branches: + - master + - stable* + +env: + # Location of the phpunit.xml and phpunit.integration.xml files + PHPUNIT_CONFIG: ./tests/phpunit.xml + PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml + +jobs: + phpunit-mysql: + runs-on: ubuntu-latest + + strategy: + matrix: + php-versions: ['8.1', '8.2'] + server-versions: ['master'] + + services: + mysql: + image: mariadb:10.5 + ports: + - 4444:3306/tcp + env: + MYSQL_ROOT_PASSWORD: rootpassword + options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5 + + steps: + - name: Set app env + run: | + # Split and keep last + echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - 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: Checkout server + uses: actions/checkout@v3 + with: + submodules: true + repository: nextcloud/server + ref: ${{ matrix.server-versions }} + + - name: Checkout app + uses: actions/checkout@v3 + with: + path: apps/${{ env.APP_NAME }} + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: phpunit + extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql + coverage: none + + - name: Set up PHPUnit + working-directory: apps/${{ env.APP_NAME }} + run: composer i + + - name: Set up Nextcloud + env: + DB_PORT: 4444 + run: | + mkdir data + ./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 password + ./occ app:enable ${{ env.APP_NAME }} + + - name: Check PHPUnit config file existence + id: check_phpunit + uses: andstor/file-existence-action@v1 + with: + files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_CONFIG }} + + - name: PHPUnit + # Only run if phpunit config file exists + if: steps.check_phpunit.outputs.files_exists == 'true' + working-directory: apps/${{ env.APP_NAME }} + run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} + + - name: Check PHPUnit integration config file existence + id: check_integration + uses: andstor/file-existence-action@v1 + with: + files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }} + + - name: Run Nextcloud + # Only run if phpunit integration config file exists + if: steps.check_integration.outputs.files_exists == 'true' + run: php -S localhost:8080 & + + - name: PHPUnit integration + # Only run if phpunit integration config file exists + if: steps.check_integration.outputs.files_exists == 'true' + working-directory: apps/${{ env.APP_NAME }} + run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + + summary: + runs-on: ubuntu-latest + needs: phpunit-mysql + + if: always() + + name: phpunit-mysql-summary + + steps: + - name: Summary status + run: if ${{ needs.phpunit-mysql.result != 'success' }}; then exit 1; fi From fe4ef179cdb43cd22bc573cbe3a96910ef7551bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 17 May 2022 18:07:24 +0200 Subject: [PATCH 02/15] Empty drone config and adapt phpunit workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .drone.yml | 1971 --------------------------- .github/workflows/phpunit-mysql.yml | 39 +- 2 files changed, 1 insertion(+), 2009 deletions(-) diff --git a/.drone.yml b/.drone.yml index cb20021cfd701..f9378321f3178 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,1974 +19,3 @@ trigger: event: - 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: pipeline -name: nodb - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: nodb-php8.0 - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - commands: - - bash tests/drone-run-php-tests.sh || exit 0 - - NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: sqlite - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: sqlite-php8.0 - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - commands: - - bash tests/drone-run-php-tests.sh || exit 0 - - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: mariadb10.2-php8.0 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: mariadb10.2-php8.0 - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - commands: - - bash tests/drone-run-php-tests.sh || exit 0 - - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mariadb - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest -- name: mariadb - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.2:10.2 - environment: - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_DATABASE: oc_autotest - command: - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - tmpfs: - - /var/lib/mysql - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: mariadb10.4-php8.0 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: mariadb10.4-php8.0 - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - commands: - - bash tests/drone-run-php-tests.sh || exit 0 - - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mariadb - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest -- name: mariadb - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.4:10.4 - environment: - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_DATABASE: oc_autotest - command: - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - tmpfs: - - /var/lib/mysql - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: mariadb10.6-php8.0 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: mariadb10.6-php8.0 - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - commands: - - bash tests/drone-run-php-tests.sh || exit 0 - - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mariadb - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest -- name: mariadb - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.6:latest - environment: - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_DATABASE: oc_autotest - command: - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - tmpfs: - - /var/lib/mysql - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: mysql8.0-php8.0 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: mysql-php8.0 - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - commands: - - bash tests/drone-run-php-tests.sh || exit 0 - - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysql - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest -- name: mysql - image: ghcr.io/nextcloud/continuous-integration-mysql-8.0:mysql-8.0 - command: - - --default-authentication-plugin=mysql_native_password - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - environment: - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_DATABASE: oc_autotest - tmpfs: - - /var/lib/mysql - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: postgres10-php8.0 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: postgres-php8.0 - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - commands: - - bash tests/drone-run-php-tests.sh || exit 0 - - sleep 10 # gives the database enough time to initialize - - POSTGRES=10 NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh pgsql - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest -- name: postgres-10 - image: ghcr.io/nextcloud/continuous-integration-postgres-10:postgres-10 - environment: - POSTGRES_USER: oc_autotest - POSTGRES_DB: oc_autotest - POSTGRES_PASSWORD: owncloud - tmpfs: - - /var/lib/postgresql/data - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: postgres11-php8.0 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: postgres-php8.0 - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - commands: - - bash tests/drone-run-php-tests.sh || exit 0 - - sleep 10 # gives the database enough time to initialize - - POSTGRES=11 NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh pgsql - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest -- name: postgres-11 - image: ghcr.io/nextcloud/continuous-integration-postgres-11:postgres-11 - environment: - POSTGRES_USER: oc_autotest - POSTGRES_DB: oc_autotest - POSTGRES_PASSWORD: owncloud - tmpfs: - - /var/lib/postgresql/data - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: postgres13-php8.0 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: postgres-php8.0 - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - commands: - - bash tests/drone-run-php-tests.sh || exit 0 - - sleep 10 # gives the database enough time to initialize - - POSTGRES=13 NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh pgsql - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest -- name: postgres-13 - image: ghcr.io/nextcloud/continuous-integration-postgres-13:postgres-13 - environment: - POSTGRES_USER: oc_autotest - POSTGRES_DB: oc_autotest - POSTGRES_PASSWORD: owncloud - tmpfs: - - /var/lib/postgresql/data - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: postgres15-php8.0 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: postgres-php8.0 - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - commands: - - bash tests/drone-run-php-tests.sh || exit 0 - - sleep 10 # gives the database enough time to initialize - - POSTGRES=15 NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh pgsql - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest -- name: postgres-15 - image: ghcr.io/nextcloud/continuous-integration-postgres-15:latest - environment: - POSTGRES_USER: oc_autotest - POSTGRES_DB: oc_autotest - POSTGRES_PASSWORD: owncloud - tmpfs: - - /var/lib/postgresql/data - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-capabilities_features - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-capabilities_features - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh capabilities_features/capabilities.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-collaboration_features - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-collaboration_features - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh collaboration_features/ - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-federation_features - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-federation_features - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin - - cd build/integration - - ./run.sh federation_features/ - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-auth - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-auth - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/auth.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-avatar - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-avatar - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/avatar.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-maintenance-mode - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-maintenance-mode - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/maintenance-mode.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-ratelimiting - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-ratelimiting - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - ./occ config:system:set redis host --value=cache - - ./occ config:system:set redis port --value=6379 --type=integer - - ./occ config:system:set redis timeout --value=0 --type=integer - - ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.local - - ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.distributed - - ./occ app:enable testing - - cd build/integration - - ./run.sh features/ratelimiting.feature - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-carddav - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-carddav - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/carddav.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-dav-v2 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-dav-v2 - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/dav-v2.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-ocs-v1 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-ocs-v1 - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/ocs-v1.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-checksums-v1 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-checksums-v1 - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/checksums.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-external-storage - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-external-storage - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/external-storage.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-provisioning-v1 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-provisioning-v1 - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/provisioning-v1.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-tags - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-tags - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/tags.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-caldav - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-caldav - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/caldav.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-comments - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-comments - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/comments.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-comments-search - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-comments-search - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/comments-search.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-contacts-menu - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-contacts-menu - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/contacts-menu.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-favorites - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-favorites - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/favorites.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-provisioning-v2 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-provisioning-v2 - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/provisioning-v2.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-webdav-related - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-webdav-related - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/webdav-related.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-sharees-features - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-sharees-features - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh sharees_features/sharees.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-sharees-v2-features - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-sharees-v2-features - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh sharees_features/sharees_provisioningapiv2.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-sharing-v1 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-sharing-v1 - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh sharing_features/sharing-v1.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-sharing-v1-part2 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-sharing-v1-part2 - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh sharing_features/sharing-v1-part2.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-sharing-v1-part3 - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-sharing-v1-part3 - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh sharing_features/sharing-v1-part3.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-sharing-v1-video-verification - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: install-talk - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - # JavaScript files are not used in integration tests so it is not needed to - # build them. - - git clone --depth 1 https://github.com/nextcloud/spreed apps/spreed -- name: integration-sharing-v1-video-verification - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh sharing_features/sharing-v1-video-verification.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-setup-features - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-setup-features - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - cd build/integration - - ./run.sh setup_features/setup.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-filesdrop-features - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-filesdrop-features - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh filesdrop_features/filesdrop.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-transfer-ownership-features - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-transfer-ownership-features - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/transfer-ownership.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-ldap-features - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-ldap-features - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh ldap_features/ldap-ocs.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-ldap-openldap-features - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-ldap-openldap-features - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - ./occ config:system:set redis host --value=cache - - ./occ config:system:set redis port --value=6379 --type=integer - - ./occ config:system:set redis timeout --value=0 --type=integer - - ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.local - - ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.distributed - - cd build/integration - - ./run.sh ldap_features/ldap-openldap.feature - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest -- name: openldap - image: ghcr.io/nextcloud/continuous-integration-openldap:openldap-7 - environment: - SLAPD_DOMAIN: nextcloud.ci - SLAPD_ORGANIZATION: Nextcloud - SLAPD_PASSWORD: admin - SLAPD_ADDITIONAL_MODULES: memberof - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-ldap-openldap-uid-features - -steps: - - name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init - - name: integration-ldap-openldap-uid-features - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - ./occ config:system:set redis host --value=cache - - ./occ config:system:set redis port --value=6379 --type=integer - - ./occ config:system:set redis timeout --value=0 --type=integer - - ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.local - - ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.distributed - - cd build/integration - - ./run.sh ldap_features/openldap-uid-username.feature - -services: - - name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest - - name: openldap - image: ghcr.io/nextcloud/continuous-integration-openldap:openldap-7 - environment: - SLAPD_DOMAIN: nextcloud.ci - SLAPD_ORGANIZATION: Nextcloud - SLAPD_PASSWORD: admin - SLAPD_ADDITIONAL_MODULES: memberof - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push -type: docker - ---- -kind: pipeline -name: integration-ldap-openldap-numerical-id-features - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-ldap-openldap-numerical-id-features - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - ./occ config:system:set redis host --value=cache - - ./occ config:system:set redis port --value=6379 --type=integer - - ./occ config:system:set redis timeout --value=0 --type=integer - - ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.local - - ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.distributed - - cd build/integration - - ./run.sh ldap_features/openldap-numerical-id.feature - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest -- name: openldap - image: ghcr.io/nextcloud/continuous-integration-openldap:openldap-7 - environment: - SLAPD_DOMAIN: nextcloud.ci - SLAPD_ORGANIZATION: Nextcloud - SLAPD_PASSWORD: admin - SLAPD_ADDITIONAL_MODULES: memberof - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-trashbin - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-trashbin - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh features/trashbin.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-remote-api - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-remote-api - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh remoteapi_features/remote.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: integration-download - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: integration-download - image: ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest - commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - - cd build/integration - - ./run.sh --tags ~@large features/download.feature - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: acceptance-access-levels - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: acceptance-access-levels - image: ghcr.io/nextcloud/continuous-integration-acceptance-php8.0:latest - commands: - - tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-access-levels --selenium-server selenium:4444 allow-git-repository-modifications features/access-levels.feature - -services: -- name: selenium - image: ghcr.io/nextcloud/continuous-integration-selenium:3.141.59 - environment: - # Reduce default log level for Selenium server (INFO) as it is too - # verbose. - JAVA_OPTS: -Dselenium.LOGGER.level=WARNING - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: acceptance-app-files - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: acceptance-app-files - image: ghcr.io/nextcloud/continuous-integration-acceptance-php8.0:latest - commands: - - tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-app-files --selenium-server selenium:4444 allow-git-repository-modifications features/app-files.feature - -services: -- name: selenium - image: ghcr.io/nextcloud/continuous-integration-selenium:3.141.59 - environment: - # Reduce default log level for Selenium server (INFO) as it is too - # verbose. - JAVA_OPTS: -Dselenium.LOGGER.level=WARNING - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: acceptance-app-files-sharing - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: acceptance-app-files-sharing - image: ghcr.io/nextcloud/continuous-integration-acceptance-php8.0:latest - commands: - - tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-app-files-sharing --selenium-server selenium:4444 allow-git-repository-modifications features/app-files-sharing.feature - -services: -- name: selenium - image: ghcr.io/nextcloud/continuous-integration-selenium:3.141.59 - environment: - # Reduce default log level for Selenium server (INFO) as it is too - # verbose. - JAVA_OPTS: -Dselenium.LOGGER.level=WARNING - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: acceptance-app-files-sharing-link - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: acceptance-app-files-sharing-link - image: ghcr.io/nextcloud/continuous-integration-acceptance-php8.0:latest - commands: - - tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-app-files-sharing-link --selenium-server selenium:4444 allow-git-repository-modifications features/app-files-sharing-link.feature - -services: -- name: selenium - image: ghcr.io/nextcloud/continuous-integration-selenium:3.141.59 - environment: - # Reduce default log level for Selenium server (INFO) as it is too - # verbose. - JAVA_OPTS: -Dselenium.LOGGER.level=WARNING - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: acceptance-app-files-tags - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: acceptance-app-files-tags - image: ghcr.io/nextcloud/continuous-integration-acceptance-php8.0:latest - commands: - - tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-app-files-tags --selenium-server selenium:4444 allow-git-repository-modifications features/app-files-tags.feature - -services: -- name: selenium - image: ghcr.io/nextcloud/continuous-integration-selenium:3.141.59 - environment: - # Reduce default log level for Selenium server (INFO) as it is too - # verbose. - JAVA_OPTS: -Dselenium.LOGGER.level=WARNING - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: acceptance-header - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: acceptance-header - image: ghcr.io/nextcloud/continuous-integration-acceptance-php8.0:latest - commands: - - tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-header --selenium-server selenium:4444 allow-git-repository-modifications features/header.feature - -services: -- name: selenium - image: ghcr.io/nextcloud/continuous-integration-selenium:3.141.59 - environment: - # Reduce default log level for Selenium server (INFO) as it is too - # verbose. - JAVA_OPTS: -Dselenium.LOGGER.level=WARNING - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: acceptance-login - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: acceptance-login - image: ghcr.io/nextcloud/continuous-integration-acceptance-php8.0:latest - commands: - - tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-login --selenium-server selenium:4444 allow-git-repository-modifications features/login.feature - -services: -- name: selenium - image: ghcr.io/nextcloud/continuous-integration-selenium:3.141.59 - environment: - # Reduce default log level for Selenium server (INFO) as it is too - # verbose. - JAVA_OPTS: -Dselenium.LOGGER.level=WARNING - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: acceptance-users - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: acceptance-users - image: ghcr.io/nextcloud/continuous-integration-acceptance-php8.0:latest - commands: - - tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-users --selenium-server selenium:4444 allow-git-repository-modifications features/users.feature - -services: -- name: selenium - image: ghcr.io/nextcloud/continuous-integration-selenium:3.141.59 - environment: - # Reduce default log level for Selenium server (INFO) as it is too - # verbose. - JAVA_OPTS: -Dselenium.LOGGER.level=WARNING - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: acceptance-apps - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: acceptance-apps - image: ghcr.io/nextcloud/continuous-integration-acceptance-php8.0:latest - commands: - - tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-apps --selenium-server selenium:4444 allow-git-repository-modifications features/apps.feature - -services: -- name: selenium - image: ghcr.io/nextcloud/continuous-integration-selenium:3.141.59 - environment: - # Reduce default log level for Selenium server (INFO) as it is too - # verbose. - JAVA_OPTS: -Dselenium.LOGGER.level=WARNING - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: nodb-codecov - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: nodb-codecov - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - environment: - CODECOV_TOKEN: - from_secret: CODECOV_TOKEN - XDEBUG_MODE: coverage - commands: - - phpenmod xdebug - - TEST_SELECTION=NODB ./autotest.sh sqlite - - wget https://codecov.io/bash -O codecov.sh - - bash codecov.sh -Z -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest - -trigger: - branch: - - master - - stable* - event: - - push - ---- -kind: pipeline -name: db-codecov - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: db-codecov - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - environment: - CODECOV_TOKEN: - from_secret: CODECOV_TOKEN - XDEBUG_MODE: coverage - commands: - - phpenmod xdebug - - TEST_SELECTION=QUICKDB ./autotest.sh sqlite - - wget https://codecov.io/bash -O codecov.sh - - bash codecov.sh -Z -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml - -services: -- name: cache - image: ghcr.io/nextcloud/continuous-integration-redis:latest - -trigger: - branch: - - master - - stable* - event: - - push - ---- -kind: pipeline -name: object-store-s3 - -steps: -- name: minio - image: ghcr.io/nextcloud/continuous-integration-minio:latest - detach: true - commands: - - mkdir /s3data - - minio server /s3data - environment: - MINIO_ROOT_USER: nextcloud - MINIO_ROOT_PASSWORD: nextcloud -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: object-store - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - environment: - OBJECT_STORE: s3 - CODECOV_TOKEN: - from_secret: CODECOV_TOKEN - commands: - - phpenmod xdebug - - ./tests/drone-wait-objectstore.sh - - TEST_SELECTION=PRIMARY-s3 ./autotest.sh sqlite - - wget https://codecov.io/bash -O codecov.sh - - bash codecov.sh -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: object-store-azure - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: object-store - image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - environment: - OBJECT_STORE: azure - CODECOV_TOKEN: - from_secret: CODECOV_TOKEN - commands: - - phpenmod xdebug - - ./tests/drone-wait-objectstore.sh - - TEST_SELECTION=PRIMARY-azure ./autotest.sh sqlite - - wget https://codecov.io/bash -O codecov.sh - - bash codecov.sh -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml - -services: -- name: azurite - image: ghcr.io/nextcloud/continuous-integration-azurite:latest - environment: - executable: blob - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push - ---- -kind: pipeline -name: memcache-memcached - -steps: -- name: submodules - image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest - commands: - - git submodule update --init -- name: memcache-memcached - image: ghcr.io/nextcloud/continuous-integration-php8.0-memcached:latest - commands: - - phpenmod xdebug - - service memcached restart - - ./autotest.sh sqlite tests/lib/Memcache/MemcachedTest.php - - 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-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-clover-sqlite.xml; fi" - -trigger: - branch: - - master - - stable* - event: - - pull_request - - push diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index ec0de4cb3ed2a..46f2fc845cdf7 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -12,11 +12,6 @@ on: - master - stable* -env: - # Location of the phpunit.xml and phpunit.integration.xml files - PHPUNIT_CONFIG: ./tests/phpunit.xml - PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml - jobs: phpunit-mysql: runs-on: ubuntu-latest @@ -53,11 +48,6 @@ jobs: repository: nextcloud/server ref: ${{ matrix.server-versions }} - - name: Checkout app - uses: actions/checkout@v3 - with: - path: apps/${{ env.APP_NAME }} - - name: Set up php ${{ matrix.php-versions }} uses: shivammathur/setup-php@v2 with: @@ -76,36 +66,9 @@ jobs: run: | mkdir data ./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 password - ./occ app:enable ${{ env.APP_NAME }} - - - name: Check PHPUnit config file existence - id: check_phpunit - uses: andstor/file-existence-action@v1 - with: - files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_CONFIG }} - name: PHPUnit - # Only run if phpunit config file exists - if: steps.check_phpunit.outputs.files_exists == 'true' - working-directory: apps/${{ env.APP_NAME }} - run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} - - - name: Check PHPUnit integration config file existence - id: check_integration - uses: andstor/file-existence-action@v1 - with: - files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }} - - - name: Run Nextcloud - # Only run if phpunit integration config file exists - if: steps.check_integration.outputs.files_exists == 'true' - run: php -S localhost:8080 & - - - name: PHPUnit integration - # Only run if phpunit integration config file exists - if: steps.check_integration.outputs.files_exists == 'true' - working-directory: apps/${{ env.APP_NAME }} - run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + run: NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite summary: runs-on: ubuntu-latest From 77c7b5eb28c19dbe60297d136ab57e0c1a1134c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 17 May 2022 18:38:01 +0200 Subject: [PATCH 03/15] Try to fix phpunit installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/phpunit-mysql.yml | 21 ++--- .github/workflows/s3-external.yml | 128 ---------------------------- .github/workflows/s3-primary.yml | 76 ----------------- .github/workflows/smb-kerberos.yml | 64 -------------- 4 files changed, 8 insertions(+), 281 deletions(-) delete mode 100644 .github/workflows/s3-external.yml delete mode 100644 .github/workflows/s3-primary.yml delete mode 100644 .github/workflows/smb-kerberos.yml diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index 46f2fc845cdf7..a1f4f58e85c4a 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -17,9 +17,10 @@ jobs: runs-on: ubuntu-latest strategy: + # do not stop on another job's failure + fail-fast: false matrix: php-versions: ['8.1', '8.2'] - server-versions: ['master'] services: mysql: @@ -31,11 +32,6 @@ jobs: options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5 steps: - - name: Set app env - run: | - # Split and keep last - echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - - 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 @@ -45,20 +41,18 @@ jobs: uses: actions/checkout@v3 with: submodules: true - repository: nextcloud/server - ref: ${{ matrix.server-versions }} - name: Set up php ${{ matrix.php-versions }} uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - tools: phpunit extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql coverage: none - - name: Set up PHPUnit - working-directory: apps/${{ env.APP_NAME }} - run: composer i + - name: composer i + run: | + composer i + composer require --dev phpunit/phpunit - name: Set up Nextcloud env: @@ -68,7 +62,8 @@ jobs: ./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 password - name: PHPUnit - run: NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite + working-directory: tests + run: ../vendor/bin/phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB summary: runs-on: ubuntu-latest diff --git a/.github/workflows/s3-external.yml b/.github/workflows/s3-external.yml deleted file mode 100644 index a5060f3e573d4..0000000000000 --- a/.github/workflows/s3-external.yml +++ /dev/null @@ -1,128 +0,0 @@ -name: S3 External storage -on: - push: - branches: - - master - - stable* - paths: - - 'apps/files_external/**' - pull_request: - paths: - - 'apps/files_external/**' - -env: - APP_NAME: files_external - -jobs: - s3-external-tests-minio: - runs-on: ubuntu-latest - - strategy: - # do not stop on another job's failure - fail-fast: false - matrix: - php-versions: ['8.0', '8.1'] - - name: php${{ matrix.php-versions }}-minio - - services: - minio: - env: - MINIO_ACCESS_KEY: minio - MINIO_SECRET_KEY: minio123 - image: bitnami/minio:2021.10.6 - ports: - - "9000:9000" - - steps: - - name: Checkout server - uses: actions/checkout@v3 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - tools: phpunit - 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 - ./occ app:enable --force ${{ env.APP_NAME }} - php -S localhost:8080 & - - name: PHPUnit - run: | - echo " true, 'secret' => 'actually-not-secret', 'passwordsalt' => 'actually-not-secret', 'hostname' => 'localhost','key' => 'minio','secret' => 'minio123', 'bucket' => 'bucket', 'port' => 9000, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/${{ env.APP_NAME }}/tests/config.amazons3.php - phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/Amazons3Test.php - phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/VersionedAmazonS3Test.php - - name: S3 logs - if: always() - run: | - docker ps -a - docker logs $(docker ps -aq) - s3-external-tests-localstack: - runs-on: ubuntu-latest - - strategy: - # do not stop on another job's failure - fail-fast: false - matrix: - php-versions: ['8.0', '8.1'] - - name: php${{ matrix.php-versions }}-localstack - - services: - minio: - env: - SERVICES: s3 - DEBUG: 1 - image: localstack/localstack:0.12.7 - ports: - - "4566:4566" - - steps: - - name: Checkout server - uses: actions/checkout@v3 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - tools: phpunit - 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 - ./occ app:enable --force ${{ env.APP_NAME }} - php -S localhost:8080 & - - name: PHPUnit - run: | - echo " true,'hostname' => 'localhost','key' => 'ignored','secret' => 'ignored', 'bucket' => 'bucket', 'port' => 4566, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/${{ env.APP_NAME }}/tests/config.amazons3.php - phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/Amazons3Test.php - phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/VersionedAmazonS3Test.php - - name: S3 logs - if: always() - run: | - docker ps -a - docker logs $(docker ps -aq) - - s3-external-summary: - runs-on: ubuntu-latest - needs: [s3-external-tests-minio, s3-external-tests-localstack] - - if: always() - - steps: - - name: Summary status - run: if ${{ needs.s3-external-tests-minio.result != 'success' }} || ${{ needs.s3-external-tests-localstack.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/s3-primary.yml b/.github/workflows/s3-primary.yml deleted file mode 100644 index 7b6276b39f53b..0000000000000 --- a/.github/workflows/s3-primary.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: S3 primary storage -on: - pull_request: - push: - branches: - - master - - stable* - -jobs: - s3-primary-tests-minio: - runs-on: ubuntu-20.04 - - 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: - minio: - env: - MINIO_ACCESS_KEY: minio - MINIO_SECRET_KEY: minio123 - image: bitnami/minio:2021.12.29 - ports: - - "9000:9000" - - steps: - - name: Checkout server - uses: actions/checkout@v3 - with: - submodules: true - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - tools: phpunit - extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Nextcloud - run: | - mkdir data - echo ' ["class" => "OC\Files\ObjectStore\S3", "arguments" => ["bucket" => "nextcloud", "autocreate" => true, "key" => "minio", "secret" => "minio123", "hostname" => "localhost", "port" => 9000, "use_ssl" => false, "use_path_style" => true, "uploadPartSize" => 52428800]]];' > 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 index.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 - working-directory: tests - run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB - - name: S3 logs - if: always() - run: | - docker ps -a - docker logs $(docker ps -aq) - - - s3-primary-summary: - runs-on: ubuntu-latest - needs: [s3-primary-tests-minio] - - if: always() - - steps: - - name: Summary status - run: if ${{ needs.s3-primary-tests-minio.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 f47a06fbed794..0000000000000 --- a/.github/workflows/smb-kerberos.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Samba Kerberos SSO -on: - push: - branches: - - master - - stable* - paths: - - 'apps/files_external/**' - pull_request: - paths: - - 'apps/files_external/**' - -jobs: - smb-kerberos-tests: - runs-on: ubuntu-latest - - name: kerberos - - steps: - - name: Checkout server - uses: actions/checkout@v3 - with: - submodules: true - - name: Pull images - run: | - docker pull icewind1991/samba-krb-test-dc - docker pull icewind1991/samba-krb-test-apache - docker pull icewind1991/samba-krb-test-client - - name: Setup AD-DC - run: | - mkdir data - sudo chown -R 33 data apps config - apps/files_external/tests/setup-krb.sh - - name: Set up Nextcloud - run: | - docker exec --user 33 apache ./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 - docker exec --user 33 apache ./occ config:system:set trusted_domains 1 --value 'httpd.domain.test' - - # setup user_saml - docker exec --user 33 apache ./occ app:enable user_saml --force - docker exec --user 33 apache ./occ config:app:set user_saml type --value 'environment-variable' - docker exec --user 33 apache ./occ config:app:set user_saml general-uid_mapping --value REMOTE_USER - - # setup external storage - docker exec --user 33 apache ./occ app:enable files_external --force - docker exec --user 33 apache ./occ files_external:create smb smb smb::kerberosapache - docker exec --user 33 apache ./occ files_external:config 1 host krb.domain.test - docker exec --user 33 apache ./occ files_external:config 1 share netlogon - docker exec --user 33 apache ./occ files_external:list - - name: Test SSO - run: | - mkdir cookies - chmod 0777 cookies - - DC_IP=$(docker inspect dc --format '{{.NetworkSettings.IPAddress}}') - echo "SAML login" - docker run --rm --name client -v $PWD/cookies:/cookies -v /tmp/shared:/shared --dns $DC_IP --hostname client.domain.test icewind1991/samba-krb-test-client \ - curl -c /cookies/jar --negotiate -u testuser@DOMAIN.TEST: --delegation always http://httpd.domain.test/index.php/apps/user_saml/saml/login - echo "Check we are logged in" - CONTENT=$(docker run --rm --name client -v $PWD/cookies:/cookies -v /tmp/shared:/shared --dns $DC_IP --hostname client.domain.test icewind1991/samba-krb-test-client \ - curl -b /cookies/jar -s --negotiate -u testuser@DOMAIN.TEST: --delegation always http://httpd.domain.test/remote.php/webdav/smb/test.txt) - echo $CONTENT - CONTENT=$(echo $CONTENT | tr -d '[:space:]') - [[ $CONTENT == "testfile" ]] From 99d83a05db57a9d61e509c6eff672c077c37cb15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 17 May 2022 19:11:09 +0200 Subject: [PATCH 04/15] Fix port and mariadb detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- autotest.sh | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/autotest.sh b/autotest.sh index 84ffa0a1c785c..bbeef003f4e04 100755 --- a/autotest.sh +++ b/autotest.sh @@ -16,6 +16,7 @@ DATABASENAME=oc_autotest DATABASEUSER=oc_autotest DATABASEHOST=localhost +DATABASEPORT=4444 ADMINLOGIN=admin BASEDIR=$PWD @@ -268,40 +269,8 @@ function execute_tests { cp tests/docker/mysqlmb4.config.php config fi if [ "$DB" == "mariadb" ] ; then - if [ ! -z "$USEDOCKER" ] ; then - echo "Fire up the mariadb docker" - DOCKER_CONTAINER_ID=$(docker run \ - -v $BASEDIR/tests/docker/mariadb:/etc/mysql/conf.d \ - -e MYSQL_ROOT_PASSWORD=owncloud \ - -e MYSQL_USER="$DATABASEUSER" \ - -e MYSQL_PASSWORD=owncloud \ - -e MYSQL_DATABASE="$DATABASENAME" \ - -d mariadb) - DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID") - - echo "Waiting for MariaDB initialisation ..." - if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 3306 300; then - echo "[ERROR] Waited 300 seconds, no response" >&2 - exit 1 - fi - - echo "MariaDB is up." - - else - if [ -z "$DRONE" ] ; then # no need to drop the DB when we are on CI - if [ "MariaDB" != "$(mysql --version | grep -o MariaDB)" ] ; then - echo "Your mysql binary is not provided by MariaDB" - echo "To use the docker container set the USEDOCKER environment variable" - exit -1 - fi - mysql -u "$DATABASEUSER" -powncloud -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true - else - DATABASEHOST=mariadb - fi - fi - echo "Waiting for MariaDB initialisation ..." - if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 3306 300; then + if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST $DATABASEPORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2 exit 1 fi From 4a46eb047539ba61b0471661129232776ac81ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 19 May 2022 10:03:21 +0200 Subject: [PATCH 05/15] Allow 8.2 in versioncheck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/oci.yml | 2 +- lib/versioncheck.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/oci.yml b/.github/workflows/oci.yml index bdf6da52bed0e..c5bc79b0d0ba6 100644 --- a/.github/workflows/oci.yml +++ b/.github/workflows/oci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - php-versions: ['8.0', '8.1'] + php-versions: ['8.2'] services: oracle: diff --git a/lib/versioncheck.php b/lib/versioncheck.php index 7c95b33310244..8869fe9545331 100644 --- a/lib/versioncheck.php +++ b/lib/versioncheck.php @@ -33,10 +33,10 @@ exit(1); } -// Show warning if >= PHP 8.2 is used as Nextcloud is not compatible with >= PHP 8.2 for now -if (PHP_VERSION_ID >= 80200) { +// Show warning if >= PHP 8.3 is used as Nextcloud is not compatible with >= PHP 8.3 for now +if (PHP_VERSION_ID >= 80300) { http_response_code(500); - echo 'This version of Nextcloud is not compatible with PHP>=8.2.
'; + echo 'This version of Nextcloud is not compatible with PHP>=8.3.
'; echo 'You are currently running ' . PHP_VERSION . '.'; exit(1); } From dc28cb77a40b6812fa6e199c5ecac1794e8afa3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 19 May 2022 11:36:35 +0200 Subject: [PATCH 06/15] Run phpunit from correct folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/oci.yml | 7 ++++++- .github/workflows/phpunit-mysql.yml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/oci.yml b/.github/workflows/oci.yml index c5bc79b0d0ba6..25ffdbffb9788 100644 --- a/.github/workflows/oci.yml +++ b/.github/workflows/oci.yml @@ -39,6 +39,11 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: composer i + run: | + composer i + composer require --dev phpunit/phpunit + - name: Set up Nextcloud run: | mkdir data @@ -47,7 +52,7 @@ jobs: - name: PHPUnit working-directory: tests - run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB + run: ../lib/composer/bin/phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB summary: permissions: diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index a1f4f58e85c4a..909c2cbba1ef0 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -63,7 +63,7 @@ jobs: - name: PHPUnit working-directory: tests - run: ../vendor/bin/phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB + run: ../lib/composer/bin/phpunit --configuration phpunit-autotest.xml summary: runs-on: ubuntu-latest From 75bbbd01c7eca22062c99b3ea0b67e524c794d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 13 Jun 2022 12:14:34 +0200 Subject: [PATCH 07/15] Add sqlite testing, add php --version to check used version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/phpunit-mysql.yml | 2 + .github/workflows/phpunit-sqlite.yml | 72 ++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 .github/workflows/phpunit-sqlite.yml diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index 909c2cbba1ef0..e5b8d6cdf1ab2 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -48,6 +48,7 @@ jobs: php-version: ${{ matrix.php-versions }} extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql coverage: none + update: true - name: composer i run: | @@ -58,6 +59,7 @@ jobs: env: DB_PORT: 4444 run: | + php --version mkdir data ./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 password diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml new file mode 100644 index 0000000000000..9584cf9761ba6 --- /dev/null +++ b/.github/workflows/phpunit-sqlite.yml @@ -0,0 +1,72 @@ +# 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 + +on: + pull_request: + push: + branches: + - main + - master + - stable* + +permissions: + contents: read + +env: + # Location of the phpunit.xml and phpunit.integration.xml files + PHPUNIT_CONFIG: ./tests/phpunit.xml + PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml + +jobs: + phpunit-sqlite: + runs-on: ubuntu-latest + + strategy: + matrix: + php-versions: ['8.1', '8.2'] + + steps: + - name: Checkout server + uses: actions/checkout@v3 + with: + submodules: true + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: phpunit + extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite + coverage: none + + - name: composer i + run: composer i + + - name: Set up Nextcloud + env: + DB_PORT: 4444 + run: | + mkdir data + ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password + + - name: PHPUnit + working-directory: tests + run: phpunit --configuration phpunit-autotest.xml + + summary: + permissions: + contents: none + runs-on: ubuntu-latest + needs: phpunit-sqlite + + if: always() + + name: phpunit-sqlite-summary + + steps: + - name: Summary status + run: if ${{ needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi From 056185c22b69a57edc1e1519ee1cac0548e5a8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 13 Jun 2022 13:48:24 +0200 Subject: [PATCH 08/15] Remove unrelevant workflows, add a custom one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/phpunit-custom.yml | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/phpunit-custom.yml diff --git a/.github/workflows/phpunit-custom.yml b/.github/workflows/phpunit-custom.yml new file mode 100644 index 0000000000000..bc33bf37c1151 --- /dev/null +++ b/.github/workflows/phpunit-custom.yml @@ -0,0 +1,48 @@ +name: PHPUnit custom + +on: + pull_request: + push: + branches: + - main + - master + - stable* + +jobs: + phpunit-custom: + runs-on: ubuntu-latest + + steps: + - name: Checkout server + uses: actions/checkout@v3 + with: + submodules: true + path: server + + - name: Install dependencies + run: | + sudo sed -i -e "s/\# deb-src/deb-src/g" /etc/apt/sources.list + sudo apt-get update + sudo apt-get --no-install-recommends install -y composer + #sudo apt-get --no-install-recommends build-dep -y php php7.4 php7.4-ldap php7.4-zip php7.4-curl php7.4-intl php7.4-gd php-imagick + sudo apt-get --no-install-recommends install -y apache2-dev autopoint bison bsdmainutils build-essential chrpath debhelper dh-autoreconf dh-php dh-strip-nondeterminism dh-systemd dictionaries-common dwz emacsen-common firebird-dev firebird3.0-common firebird3.0-common-doc flex freetds-common freetds-dev gettext gettext-base groff-base hunspell-en-us intltool-debian libaio1 libapparmor-dev libapr1-dev libaprutil1-dev libarchive-zip-perl libargon2-dev libaspell-dev libaspell15 libbsd-dev libc-client2007e libc-client2007e-dev libcroco3 libct4 libdebhelper-perl libedit-dev libenchant-dev libenchant1c2a libexporter-tiny-perl libfbclient2 libfile-stripnondeterminism-perl libgcrypt20-dev libgd-dev libgd3 libgmp3-dev libgpg-error-dev libhunspell-1.7-0 libib-util libldap2-dev liblist-moreutils-perl liblmdb-dev libmagic-dev libmecab2 libmhash-dev libmhash2 libnss-myhostname libnuma1 libodbc1 libonig-dev libpam0g-dev libpci-dev libpci3 libpipeline1 libpspell-dev libqdbm-dev libqdbm14 libsasl2-dev libsctp-dev libsctp1 libsensors-config libsensors4-dev libsensors5 libsnmp-base libsnmp-dev libsnmp35 libsodium-dev libsodium23 libsub-override-perl libsybdb5 libsystemd-dev libtext-iconv-perl libtidy-dev libtidy5deb1 libtommath1 libuchardet0 libudev-dev libvpx-dev libvpx6 libwrap0-dev libxmlrpc-epi-dev libxmlrpc-epi0 libxmltok1 libxmltok1-dev libxpm-dev libxpm4 libzip-dev libzip5 locales-all man-db mlock netcat-traditional odbcinst odbcinst1debian2 pci.ids php-all-dev po-debconf psmisc re2c shtool systemtap-sdt-dev unixodbc unixodbc-dev xml2 libldap-2.4-2 libudev1 libxml2 libxml2-dev libzip-dev + + - name: Checkout php + run: git clone --depth=1 https://github.com/php/php-src.git + + - name: Build php + working-directory: php-src + run: | + ./buildconf + ./configure --with-ldap --with-ldap-sasl --with-zip --with-curl --with-openssl --with-zlib --enable-mbstring --enable-pcntl --enable-intl --with-password-argon2 --with-freetype --with-jpeg --enable-gd --with-imagick + #make + + - name: composer i + working-directory: server + run: | + composer i + composer require --dev phpunit/phpunit + + - name: PHPUnit + working-directory: server + run: PATH=../php-src/sapi/cli:$PATH ./autotest.sh sqlite From 29cb7b9ecc2c1d23010232af5e6ccab8f8d923f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 13 Jun 2022 15:18:34 +0200 Subject: [PATCH 09/15] Some tests with custom workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/phpunit-custom.yml | 4 +--- .github/workflows/phpunit-mysql.yml | 12 ------------ .github/workflows/phpunit-sqlite.yml | 16 +--------------- 3 files changed, 2 insertions(+), 30 deletions(-) diff --git a/.github/workflows/phpunit-custom.yml b/.github/workflows/phpunit-custom.yml index bc33bf37c1151..0b48c719cf127 100644 --- a/.github/workflows/phpunit-custom.yml +++ b/.github/workflows/phpunit-custom.yml @@ -23,9 +23,7 @@ jobs: run: | sudo sed -i -e "s/\# deb-src/deb-src/g" /etc/apt/sources.list sudo apt-get update - sudo apt-get --no-install-recommends install -y composer - #sudo apt-get --no-install-recommends build-dep -y php php7.4 php7.4-ldap php7.4-zip php7.4-curl php7.4-intl php7.4-gd php-imagick - sudo apt-get --no-install-recommends install -y apache2-dev autopoint bison bsdmainutils build-essential chrpath debhelper dh-autoreconf dh-php dh-strip-nondeterminism dh-systemd dictionaries-common dwz emacsen-common firebird-dev firebird3.0-common firebird3.0-common-doc flex freetds-common freetds-dev gettext gettext-base groff-base hunspell-en-us intltool-debian libaio1 libapparmor-dev libapr1-dev libaprutil1-dev libarchive-zip-perl libargon2-dev libaspell-dev libaspell15 libbsd-dev libc-client2007e libc-client2007e-dev libcroco3 libct4 libdebhelper-perl libedit-dev libenchant-dev libenchant1c2a libexporter-tiny-perl libfbclient2 libfile-stripnondeterminism-perl libgcrypt20-dev libgd-dev libgd3 libgmp3-dev libgpg-error-dev libhunspell-1.7-0 libib-util libldap2-dev liblist-moreutils-perl liblmdb-dev libmagic-dev libmecab2 libmhash-dev libmhash2 libnss-myhostname libnuma1 libodbc1 libonig-dev libpam0g-dev libpci-dev libpci3 libpipeline1 libpspell-dev libqdbm-dev libqdbm14 libsasl2-dev libsctp-dev libsctp1 libsensors-config libsensors4-dev libsensors5 libsnmp-base libsnmp-dev libsnmp35 libsodium-dev libsodium23 libsub-override-perl libsybdb5 libsystemd-dev libtext-iconv-perl libtidy-dev libtidy5deb1 libtommath1 libuchardet0 libudev-dev libvpx-dev libvpx6 libwrap0-dev libxmlrpc-epi-dev libxmlrpc-epi0 libxmltok1 libxmltok1-dev libxpm-dev libxpm4 libzip-dev libzip5 locales-all man-db mlock netcat-traditional odbcinst odbcinst1debian2 pci.ids php-all-dev po-debconf psmisc re2c shtool systemtap-sdt-dev unixodbc unixodbc-dev xml2 libldap-2.4-2 libudev1 libxml2 libxml2-dev libzip-dev + sudo apt-get build-dep php php-ldap php-zip php-curl php-mbstsring php-intl php-gd php-imagick - name: Checkout php run: git clone --depth=1 https://github.com/php/php-src.git diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index e5b8d6cdf1ab2..da7dfefe2a27a 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -66,15 +66,3 @@ jobs: - name: PHPUnit working-directory: tests run: ../lib/composer/bin/phpunit --configuration phpunit-autotest.xml - - summary: - runs-on: ubuntu-latest - needs: phpunit-mysql - - if: always() - - name: phpunit-mysql-summary - - steps: - - name: Summary status - run: if ${{ needs.phpunit-mysql.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index 9584cf9761ba6..aab6f92632942 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -40,7 +40,7 @@ jobs: with: php-version: ${{ matrix.php-versions }} tools: phpunit - extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite + extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, gd coverage: none - name: composer i @@ -56,17 +56,3 @@ jobs: - name: PHPUnit working-directory: tests run: phpunit --configuration phpunit-autotest.xml - - summary: - permissions: - contents: none - runs-on: ubuntu-latest - needs: phpunit-sqlite - - if: always() - - name: phpunit-sqlite-summary - - steps: - - name: Summary status - run: if ${{ needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi From 974c60e860707eebe4a074506203f93dd1fb26b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 14 Jun 2022 09:58:05 +0200 Subject: [PATCH 10/15] Use development ini file to get deprecation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/phpunit-mysql.yml | 1 + .github/workflows/phpunit-sqlite.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index da7dfefe2a27a..905401bd636f4 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -49,6 +49,7 @@ jobs: extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql coverage: none update: true + ini-file: development - name: composer i run: | diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index aab6f92632942..ae33b8e83922e 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -42,6 +42,7 @@ jobs: tools: phpunit extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, gd coverage: none + ini-file: development - name: composer i run: composer i From 03155b06d53d0e2eccba281008c256adc8bee1b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 14 Jun 2022 10:05:44 +0200 Subject: [PATCH 11/15] Clean up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/lint-eslint.yml | 44 -------------------------- .github/workflows/oci.yml | 4 +-- .github/workflows/phpunit-custom.yml | 46 ---------------------------- .github/workflows/phpunit-mysql.yml | 4 +-- 4 files changed, 4 insertions(+), 94 deletions(-) delete mode 100644 .github/workflows/lint-eslint.yml delete mode 100644 .github/workflows/phpunit-custom.yml diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml deleted file mode 100644 index bcf039ad7283f..0000000000000 --- a/.github/workflows/lint-eslint.yml +++ /dev/null @@ -1,44 +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 - -on: - pull_request: - push: - branches: - - master - - stable* - -jobs: - lint: - runs-on: ubuntu-latest - - name: eslint - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@v1.1 - id: versions - with: - fallbackNode: '^12' - fallbackNpm: '^6' - - - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@v2 - 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 - run: npm ci - - - name: Lint - run: npm run lint diff --git a/.github/workflows/oci.yml b/.github/workflows/oci.yml index 25ffdbffb9788..675a9d03f4b1b 100644 --- a/.github/workflows/oci.yml +++ b/.github/workflows/oci.yml @@ -36,13 +36,13 @@ jobs: extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, oci8, openssl, pdo_sqlite, posix, sqlite, xml, zip tools: phpunit:9 coverage: none + ini-file: development env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: composer i run: | composer i - composer require --dev phpunit/phpunit - name: Set up Nextcloud run: | @@ -52,7 +52,7 @@ jobs: - name: PHPUnit working-directory: tests - run: ../lib/composer/bin/phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB + run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB summary: permissions: diff --git a/.github/workflows/phpunit-custom.yml b/.github/workflows/phpunit-custom.yml deleted file mode 100644 index 0b48c719cf127..0000000000000 --- a/.github/workflows/phpunit-custom.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: PHPUnit custom - -on: - pull_request: - push: - branches: - - main - - master - - stable* - -jobs: - phpunit-custom: - runs-on: ubuntu-latest - - steps: - - name: Checkout server - uses: actions/checkout@v3 - with: - submodules: true - path: server - - - name: Install dependencies - run: | - sudo sed -i -e "s/\# deb-src/deb-src/g" /etc/apt/sources.list - sudo apt-get update - sudo apt-get build-dep php php-ldap php-zip php-curl php-mbstsring php-intl php-gd php-imagick - - - name: Checkout php - run: git clone --depth=1 https://github.com/php/php-src.git - - - name: Build php - working-directory: php-src - run: | - ./buildconf - ./configure --with-ldap --with-ldap-sasl --with-zip --with-curl --with-openssl --with-zlib --enable-mbstring --enable-pcntl --enable-intl --with-password-argon2 --with-freetype --with-jpeg --enable-gd --with-imagick - #make - - - name: composer i - working-directory: server - run: | - composer i - composer require --dev phpunit/phpunit - - - name: PHPUnit - working-directory: server - run: PATH=../php-src/sapi/cli:$PATH ./autotest.sh sqlite diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index 905401bd636f4..441e79b1205e1 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -46,6 +46,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} + tools: phpunit extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql coverage: none update: true @@ -54,7 +55,6 @@ jobs: - name: composer i run: | composer i - composer require --dev phpunit/phpunit - name: Set up Nextcloud env: @@ -66,4 +66,4 @@ jobs: - name: PHPUnit working-directory: tests - run: ../lib/composer/bin/phpunit --configuration phpunit-autotest.xml + run: phpunit --configuration phpunit-autotest.xml From f10a11f872c43c78e2320a960794303011570a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 4 Aug 2022 11:08:28 +0200 Subject: [PATCH 12/15] Remove node workflows and use 8.2 for performance workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/node-tests.yml | 92 ------------------------------- .github/workflows/node.yml | 58 ------------------- .github/workflows/performance.yml | 2 +- 3 files changed, 1 insertion(+), 151 deletions(-) delete mode 100644 .github/workflows/node-tests.yml delete mode 100644 .github/workflows/node.yml diff --git a/.github/workflows/node-tests.yml b/.github/workflows/node-tests.yml deleted file mode 100644 index 596e4494e43a4..0000000000000 --- a/.github/workflows/node-tests.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: Node - -on: - pull_request: - push: - branches: - - master - - stable* - -jobs: - versions: - runs-on: ubuntu-latest - outputs: - nodeVersion: ${{ steps.versions.outputs.nodeVersion }} - npmVersion: ${{ steps.versions.outputs.npmVersion }} - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@v1.1 - id: versions - with: - fallbackNode: '^12' - fallbackNpm: '^6' - - test: - runs-on: ubuntu-latest - needs: versions - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up node ${{ needs.versions.outputs.nodeVersion }} - uses: actions/setup-node@v2 - 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: Test - run: npm run test - - jsunit: - runs-on: ubuntu-latest - needs: versions - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up node ${{ needs.versions.outputs.nodeVersion }} - uses: actions/setup-node@v2 - 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: Test - run: ./autotest-js.sh - - handlebars: - runs-on: ubuntu-latest - needs: versions - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up node ${{ needs.versions.outputs.nodeVersion }} - uses: actions/setup-node@v2 - 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: Run compile - run: ./build/compile-handlebars-templates.sh diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml deleted file mode 100644 index 443ed95dd240f..0000000000000 --- a/.github/workflows/node.yml +++ /dev/null @@ -1,58 +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: - push: - branches: - - main - - master - - stable* - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - - name: node - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@v1.2 - id: versions - with: - fallbackNode: '^12' - fallbackNpm: '^6' - - - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@v3 - 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 - 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 - diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index bdf8457ff0b4b..74ed82560c6e3 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['8.0'] + php-versions: ['8.2'] name: performance-${{ matrix.php-versions }} From 4ef6f3bf5b8e6a278eb067bfe83ab5722610401a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 6 Dec 2022 13:10:49 +0100 Subject: [PATCH 13/15] Use old ubuntu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/phpunit-mysql.yml | 2 +- .github/workflows/phpunit-sqlite.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index 441e79b1205e1..cd20ae4a61de0 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -14,7 +14,7 @@ on: jobs: phpunit-mysql: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: # do not stop on another job's failure diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index ae33b8e83922e..656ff6d13bfa5 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -23,7 +23,7 @@ env: jobs: phpunit-sqlite: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: From db080c2c52ab0b93eba6e5b771954727da0b658a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 19 Dec 2022 16:23:05 +0100 Subject: [PATCH 14/15] Install extension pcntl for tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/phpunit-mysql.yml | 2 +- .github/workflows/phpunit-sqlite.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index cd20ae4a61de0..12f0fc96da902 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -47,7 +47,7 @@ jobs: with: php-version: ${{ matrix.php-versions }} tools: phpunit - extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql + extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql, pcntl coverage: none update: true ini-file: development diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index 656ff6d13bfa5..007e5c7f02700 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -40,7 +40,7 @@ jobs: with: php-version: ${{ matrix.php-versions }} tools: phpunit - extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, gd + extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, gd, pcntl coverage: none ini-file: development From 90584015153a8baaff93a2e00d77a8f18f859604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 19 Dec 2022 16:50:13 +0100 Subject: [PATCH 15/15] Attempt at fixing pcntl in tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/phpunit-mysql.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index 12f0fc96da902..4373dbaa14b6a 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -47,10 +47,17 @@ jobs: with: php-version: ${{ matrix.php-versions }} tools: phpunit - extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql, pcntl + extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql, pcntl-php/php-src@PHP-${{ matrix.php-versions }} coverage: none update: true ini-file: development + env: + PCNTL_PATH: ext/pcntl + PCNTL_CONFIGURE_OPTS: '--enable-pcntl' + + - name: Activate pcntl extension + run: | + echo 'extension=pcntl.so' | sudo tee -a /etc/php/${{ matrix.php-versions }}/fpm/conf.d/10-pcntl.ini - name: composer i run: |