Skip to content

Commit 58437de

Browse files
authored
Merge pull request #57051 from nextcloud/ci/32bit-save
ci(32bit): use custom image to run PHP unit tests on 32bit
2 parents 582bb11 + 922c3e0 commit 58437de

File tree

2 files changed

+19
-28
lines changed

2 files changed

+19
-28
lines changed

.github/workflows/phpunit-32bits.yml

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ jobs:
2626

2727
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
2828

29-
container: shivammathur/node:latest-i386
30-
3129
strategy:
3230
fail-fast: false
3331
matrix:
34-
php-versions: ["8.2", "8.3", "8.4"]
32+
php-versions: ["8.4"]
3533

3634
steps:
3735
- name: Checkout server
@@ -40,32 +38,22 @@ jobs:
4038
persist-credentials: false
4139
submodules: true
4240

43-
- name: Install tools
44-
run: |
45-
sudo apt-get update
46-
sudo apt-get install -y ffmpeg imagemagick libmagickcore-6.q16-3-extra
47-
48-
- name: Set up php ${{ matrix.php-versions }}
49-
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
50-
with:
51-
php-version: ${{ matrix.php-versions }}
52-
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
53-
coverage: none
54-
ini-file: development
55-
ini-values: apc.enabled=on, apc.enable_cli=on, disable_functions= # https://github.com/shivammathur/setup-php/discussions/573
56-
env:
57-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58-
5941
- name: Set up dependencies
60-
run: composer i
42+
uses: docker://ghcr.io/nextcloud/continuous-integration-php8.4-32bit:latest
43+
with:
44+
args: /bin/sh -c "
45+
git config --global --add safe.directory /github/workspace &&
46+
composer install --no-interaction"
6147

6248
- name: Set up Nextcloud
63-
env:
64-
DB_PORT: 4444
65-
run: |
66-
mkdir data
67-
./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
68-
php -f tests/enable_all.php
49+
uses: docker://ghcr.io/nextcloud/continuous-integration-php8.4-32bit:latest
50+
with:
51+
args: /bin/sh -c "
52+
mkdir data &&
53+
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-user=autotest --database-pass=rootpassword --admin-user admin --admin-pass admin &&
54+
php -f tests/enable_all.php"
6955

7056
- name: PHPUnit
71-
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
57+
uses: docker://ghcr.io/nextcloud/continuous-integration-php8.4-32bit:latest
58+
with:
59+
args: /bin/sh -c "composer run test -- --exclude-group PRIMARY-azure,PRIMARY-s3,PRIMARY-swift,Memcached,Redis,RoutingWeirdness"

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@
7171
"Composer\\Config::disableProcessTimeout",
7272
"PHP_CLI_SERVER_WORKERS=${NEXTCLOUD_WORKERS:=4} php -S ${NEXTCLOUD_HOST:=localhost}:${NEXTCLOUD_PORT:=8080} -t ./"
7373
],
74-
"test": "phpunit --fail-on-warning --fail-on-risky --display-warnings --display-deprecations --display-phpunit-deprecations --colors=always --configuration tests/phpunit-autotest.xml",
74+
"test": [
75+
"Composer\\Config::disableProcessTimeout",
76+
"phpunit --fail-on-warning --fail-on-risky --display-warnings --display-deprecations --display-phpunit-deprecations --colors=always --configuration tests/phpunit-autotest.xml"
77+
],
7578
"test:db": "@composer run test -- --group DB --group SLOWDB",
7679
"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",
7780
"rector": "rector --config=build/rector.php && composer cs:fix",

0 commit comments

Comments
 (0)