Skip to content
Draft
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,19 +56,18 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.3', '8.4', '8.5']
php-versions: ["8.2"]
include:
- php-versions: '8.2'
- php-versions: "8.5"
coverage: ${{ github.event_name != 'pull_request' }}

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

steps:
- name: Checkout server
Expand All @@ -83,7 +82,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: ${{ matrix.coverage && 'xdebug' || 'none' }}
ini-file: development
ini-values: disable_functions=""
Expand All @@ -96,12 +95,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 ${{ matrix.coverage && '--coverage-clover ./clover.xml' || '' }}
run: composer run test -- --group Memcached --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.xml' || '' }}

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
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