Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/phpunit-memcached.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,15 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.3', '8.5']
php-versions: ["8.3", "8.5"]

name: Memcached (PHP ${{ matrix.php-versions }})

services:
memcached:
image: ghcr.io/nextcloud/continuous-integration-redis:latest # zizmor: ignore[unpinned-images]
image: ghcr.io/nextcloud/continuous-integration-memcached:latest # zizmor: ignore[unpinned-images]
ports:
- 11212:11212/tcp
- 11212:11212/udp
- 11211:11211/tcp

steps:
- name: Checkout server
Expand All @@ -80,7 +79,7 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, memcached, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, memcached, openssl, pcntl, pdo_sqlite, posix, session, simplexml, sqlite, xmlreader, xmlwriter, zip, zlib
coverage: none
ini-file: development
ini-values: disable_functions=""
Expand All @@ -94,12 +93,13 @@ jobs:
- name: Set up Nextcloud
run: |
mkdir data
cp tests/memcached.config.php config/
cp tests/preseed-config.php config/config.php
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
php -f tests/enable_all.php

- name: PHPUnit memcached tests
run: composer run test -- --group Memcache --group Memcached --log-junit junit.xml
run: composer run test -- --group Memcached --log-junit junit.xml

- name: Print logs
if: always()
Expand Down
16 changes: 16 additions & 0 deletions tests/memcached.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
$CONFIG = [
'memcache.local' => '\\OC\\Memcache\\Memcached',
'memcache.distributed' => '\\OC\\Memcache\\Memcached',
'memcache.locking' => '\\OC\\Memcache\\Memcached',
'memcached_servers' => [
['localhost', 11211],
],
];
Loading