ci: Migrate PHPUnit configs

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2025-05-23 20:17:28 +02:00
parent 86857f2c12
commit ebee539902
No known key found for this signature in database
GPG key ID: F72FA5B49FFA96B0
3 changed files with 32 additions and 45 deletions

1
.gitignore vendored
View file

@ -152,6 +152,7 @@ Vagrantfile
# Tests - auto-generated files
/data-autotest
/results.sarif
/tests/.phpunit.cache
/tests/.phpunit.result.cache
/tests/coverage*
/tests/css

View file

@ -1,39 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<!--
- SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
- SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc.
- SPDX-License-Identifier: AGPL-3.0-only
-->
<phpunit bootstrap="bootstrap.php"
verbose="true"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="bootstrap.php"
timeoutForSmallTests="900"
timeoutForMediumTests="900"
timeoutForLargeTests="900"
>
<testsuite name='ownCloud files external'>
cacheDirectory=".phpunit.cache"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd">
<testsuite name="Nextcloud files external">
<directory>../apps/files_external/tests</directory>
<!-- exclude backends as they are called separately -->
<exclude>../apps/files_external/tests/Storage/</exclude>
</testsuite>
<!-- filters for code coverage -->
<filter>
<!-- whitelist processUncoveredFilesFromWhitelist="true" -->
<whitelist>
<source>
<include>
<file>../lib/private/Files/Storage/DAV.php</file>
<directory suffix=".php">../apps/files_external</directory>
<exclude>
<directory suffix=".php">../apps/files_external/l10n</directory>
<directory suffix=".php">../apps/files_external/3rdparty</directory>
<directory suffix=".php">../apps/files_external/tests</directory>
</exclude>
</whitelist>
</filter>
<!--<listeners>
<listener class="StartSessionListener" file="startsessionlistener.php" />
<listener class="TestCleanupListener" file="testcleanuplistener.php">
<arguments>
<string>detail</string>
</arguments>
</listener>
</listeners>-->
<directory>../apps/files_external</directory>
</include>
<exclude>
<directory>../apps/files_external/l10n</directory>
<directory>../apps/files_external/3rdparty</directory>
<directory>../apps/files_external/tests</directory>
</exclude>
</source>
</phpunit>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<!--
- SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
- SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@ -6,35 +6,30 @@
-->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="bootstrap.php"
verbose="true"
backupGlobals="false"
timeoutForSmallTests="900"
timeoutForMediumTests="900"
timeoutForLargeTests="900"
convertDeprecationsToExceptions="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd">
cacheDirectory=".phpunit.cache"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd">
<testsuite name="Nextcloud Server">
<directory>lib/</directory>
<directory>Core/</directory>
<directory>../apps/</directory>
<exclude>../apps/user_ldap/tests/Integration</exclude>
</testsuite>
<coverage>
<source>
<include>
<directory suffix=".php">..</directory>
<directory>..</directory>
</include>
<exclude>
<directory suffix=".php">../3rdparty</directory>
<directory suffix=".php">../apps/*/composer</directory>
<directory suffix=".php">../apps/*/tests</directory>
<directory suffix=".php">../apps/files_external/3rdparty</directory>
<directory suffix=".php">../build</directory>
<directory suffix=".php">../lib/composer</directory>
<directory suffix=".php">../tests</directory>
<directory suffix=".php">../vendor-bin</directory>
<directory>../3rdparty</directory>
<directory>../apps/*/composer</directory>
<directory>../apps/*/tests</directory>
<directory>../apps/files_external/3rdparty</directory>
<directory>../build</directory>
<directory>../lib/composer</directory>
<directory>../tests</directory>
<directory>../vendor-bin</directory>
</exclude>
</coverage>
<listeners>
<listener class="StartSessionListener" file="startsessionlistener.php" />
</listeners>
</source>
</phpunit>