From 958492d8af5a51d53f00384376c1acdcbae9d209 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 12 Dec 2025 17:28:28 +0100 Subject: [PATCH 1/2] ci(32bit): use custom image to run PHP unit tests on 32bit Signed-off-by: Ferdinand Thiessen --- .github/workflows/phpunit-32bits.yml | 44 +++++++++++----------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/.github/workflows/phpunit-32bits.yml b/.github/workflows/phpunit-32bits.yml index 3da2844eb7a..a788cc712a4 100644 --- a/.github/workflows/phpunit-32bits.yml +++ b/.github/workflows/phpunit-32bits.yml @@ -26,12 +26,10 @@ jobs: if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - container: shivammathur/node:latest-i386 - strategy: fail-fast: false matrix: - php-versions: ["8.2", "8.3", "8.4"] + php-versions: ["8.4"] steps: - name: Checkout server @@ -40,32 +38,24 @@ jobs: persist-credentials: false submodules: true - - name: Install tools - run: | - sudo apt-get update - sudo apt-get install -y ffmpeg imagemagick libmagickcore-6.q16-3-extra - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5 - with: - php-version: ${{ matrix.php-versions }} - extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, imagick, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite, apcu, ldap - coverage: none - ini-file: development - ini-values: apc.enabled=on, apc.enable_cli=on, disable_functions= # https://github.com/shivammathur/setup-php/discussions/573 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Set up dependencies - run: composer i + uses: docker://ghcr.io/nextcloud/continuous-integration-php8.4-32bit:latest + with: + args: /bin/sh -c " + apt-get update && + apt-get install -y unzip && + git config --global --add safe.directory /github/workspace && + composer install --no-interaction" - 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=autotest --database-pass=rootpassword --admin-user admin --admin-pass admin - php -f tests/enable_all.php + uses: docker://ghcr.io/nextcloud/continuous-integration-php8.4-32bit:latest + with: + args: /bin/sh -c " + mkdir data && + ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-user=autotest --database-pass=rootpassword --admin-user admin --admin-pass admin && + php -f tests/enable_all.php" - name: PHPUnit - run: composer run test -- --exclude-group PRIMARY-azure --exclude-group PRIMARY-s3 --exclude-group PRIMARY-swift --exclude-group Memcached --exclude-group Redis --exclude-group RoutingWeirdness + uses: docker://ghcr.io/nextcloud/continuous-integration-php8.4-32bit:latest + with: + args: /bin/sh -c "composer run test -- --exclude-group PRIMARY-azure,PRIMARY-s3,PRIMARY-swift,Memcached,Redis,RoutingWeirdness" From 922c3e01c7fb154cb7893a9dd7c576be8dcf1ffa Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 12 Dec 2025 18:37:42 +0100 Subject: [PATCH 2/2] chore: diable composer timeout Signed-off-by: Ferdinand Thiessen --- .github/workflows/phpunit-32bits.yml | 2 -- composer.json | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/phpunit-32bits.yml b/.github/workflows/phpunit-32bits.yml index a788cc712a4..5b8f2626272 100644 --- a/.github/workflows/phpunit-32bits.yml +++ b/.github/workflows/phpunit-32bits.yml @@ -42,8 +42,6 @@ jobs: uses: docker://ghcr.io/nextcloud/continuous-integration-php8.4-32bit:latest with: args: /bin/sh -c " - apt-get update && - apt-get install -y unzip && git config --global --add safe.directory /github/workspace && composer install --no-interaction" diff --git a/composer.json b/composer.json index 76d4c2ae4eb..33520b1bd7a 100644 --- a/composer.json +++ b/composer.json @@ -71,7 +71,10 @@ "Composer\\Config::disableProcessTimeout", "PHP_CLI_SERVER_WORKERS=${NEXTCLOUD_WORKERS:=4} php -S ${NEXTCLOUD_HOST:=localhost}:${NEXTCLOUD_PORT:=8080} -t ./" ], - "test": "phpunit --fail-on-warning --fail-on-risky --display-warnings --display-deprecations --display-phpunit-deprecations --colors=always --configuration tests/phpunit-autotest.xml", + "test": [ + "Composer\\Config::disableProcessTimeout", + "phpunit --fail-on-warning --fail-on-risky --display-warnings --display-deprecations --display-phpunit-deprecations --colors=always --configuration tests/phpunit-autotest.xml" + ], "test:db": "@composer run test -- --group DB --group SLOWDB", "test:files_external": "phpunit --fail-on-warning --fail-on-risky --display-warnings --display-deprecations --display-phpunit-deprecations --colors=always --configuration tests/phpunit-autotest-external.xml", "rector": "rector --config=build/rector.php && composer cs:fix",