Merge pull request #2073 from nextcloud/fix/noid/server-versions-tested

Adjust server versions to be tested
This commit is contained in:
Raimund Schlüßler 2022-10-19 14:18:09 +02:00 committed by GitHub
commit e3ef9c8500
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 2123 additions and 1142 deletions

View File

@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
php-versions: ['7.3', '7.4']
php-versions: ['8.0', '8.1']
name: php${{ matrix.php-versions }}
steps:
@ -50,7 +50,7 @@ jobs:
- name: Set up php
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.0
coverage: none
- name: Install dependencies
run: composer i

View File

@ -14,13 +14,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4']
nextcloud-versions: ['stable23', 'stable24', 'master']
php-versions: ['7.4', '8.0', '8.1']
nextcloud-versions: ['stable23', 'stable24', 'stable25', 'master']
include:
- php-versions: '7.3'
nextcloud-versions: 'stable23'
# - php-versions: '8.0'
# nextcloud-versions: 'master'
exclude:
- php-versions: '8.1'
nextcloud-versions: 'stable23'
name: php${{ matrix.php-versions }} on ${{ matrix.nextcloud-versions }} unit tests
env:
CI: true
@ -52,11 +53,6 @@ jobs:
- name: Enable app
run: php -f nextcloud/occ app:enable tasks
- name: Downgrade phpunit for php7.2
if: ${{ matrix.php-versions == '7.2' }}
working-directory: nextcloud/apps/tasks
run: composer update christophwurst/nextcloud_testing -W
- name: Install dependencies
working-directory: nextcloud/apps/tasks
run: composer install

View File

@ -9,12 +9,17 @@
"email": "dev@bernhard-posselt.com"
}
],
"require": {},
"require": {
"php": ">=7.3 <=8.1"
},
"require-dev": {
"nextcloud/coding-standard": "^0.3.0",
"phpunit/phpunit": "^7.5"
"nextcloud/coding-standard": "^1.0.0",
"phpunit/phpunit": "^9.5"
},
"config": {
"platform": {
"php": "7.4"
},
"optimize-autoloader": true,
"classmap-authoritative": true
},

3137
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -31,14 +31,13 @@ use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent;
class Application extends App implements IBootstrap {
/** @var string */
public const APP_ID = 'tasks';
/**
* @param array $params
*/
public function __construct(array $params=[]) {
public function __construct(array $params = []) {
parent::__construct(self::APP_ID, $params);
}

View File

@ -27,7 +27,6 @@ use \OCP\IRequest;
use \OCP\AppFramework\Controller;
class CollectionsController extends Controller {
/**
* @var CollectionsService
*/

View File

@ -32,7 +32,6 @@ use \OCP\IRequest;
* Controller class for main page.
*/
class PageController extends Controller {
/**
* @var IInitialStateService
*/

View File

@ -27,7 +27,6 @@ use \OCP\AppFramework\Controller;
use \OCP\IRequest;
class SettingsController extends Controller {
/**
* @var SettingsService
*/

View File

@ -30,7 +30,6 @@ use OCP\Dashboard\IWidget;
use OCP\IL10N;
class TasksWidget implements IWidget {
/**
* @var IL10N
*/

View File

@ -26,7 +26,6 @@ use OCP\IConfig;
use OCP\IL10N;
class CollectionsService {
/**
* @var string
*/
@ -99,9 +98,9 @@ class CollectionsService {
'icon' => 'Check']
];
foreach ($collections as $key => $collection) {
$tmp = $this->settings->getUserValue($this->userId, $this->appName,'show_'.$collection['id']);
$tmp = $this->settings->getUserValue($this->userId, $this->appName, 'show_'.$collection['id']);
if (!in_array($tmp, ['0','1','2'])) {
$this->settings->setUserValue($this->userId, $this->appName,'show_'.$collection['id'],$collections[$key]['show']);
$this->settings->setUserValue($this->userId, $this->appName, 'show_'.$collection['id'], $collections[$key]['show']);
} else {
$collections[$key]['show'] = (int)$tmp;
}
@ -118,7 +117,7 @@ class CollectionsService {
*/
public function setVisibility(string $collectionID, int $visibility):bool {
if (in_array($visibility, [0,1,2])) {
$this->settings->setUserValue($this->userId, $this->appName,'show_'.$collectionID,$visibility);
$this->settings->setUserValue($this->userId, $this->appName, 'show_'.$collectionID, $visibility);
}
return true;
}

View File

@ -26,7 +26,6 @@ use OCP\App\IAppManager;
use OCP\IConfig;
class SettingsService {
/**
* @var ?string
*/

View File

@ -1,26 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<phpunit bootstrap="tests/php/bootstrap.php"
verbose="true"
colors="true"
timeoutForSmallTests="900"
timeoutForMediumTests="900"
timeoutForLargeTests="900">
<testsuite name='Tasks app integration tests'>
<directory>./tests/php/integration</directory>
</testsuite>
<!-- filters for code coverage -->
<filter>
<whitelist>
<directory suffix=".php">./</directory>
<exclude>
<directory suffix=".php">./l10n</directory>
<directory suffix=".php">./templates</directory>
<directory suffix=".php">./tests</directory>
</exclude>
</whitelist>
</filter>
<logging>
<!-- and this is where your report will be written -->
<log type="coverage-clover" target="./clover.integration.xml"/>
</logging>
<?xml version="1.0" encoding="utf-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="tests/php/bootstrap.php"
verbose="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory suffix=".php">./lib</directory>
</include>
<report>
<clover outputFile="./clover.integration.xml"/>
</report>
</coverage>
<testsuite name="Tasks app integration tests">
<directory>./tests/php/integration</directory>
</testsuite>
</phpunit>

View File

@ -1,26 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<phpunit bootstrap="tests/php/bootstrap.php"
verbose="true"
colors="true"
timeoutForSmallTests="900"
timeoutForMediumTests="900"
timeoutForLargeTests="900">
<testsuite name='Tasks app tests'>
<directory>./tests/php/unit</directory>
</testsuite>
<!-- filters for code coverage -->
<filter>
<whitelist>
<directory suffix=".php">./</directory>
<exclude>
<directory suffix=".php">./l10n</directory>
<directory suffix=".php">./templates</directory>
<directory suffix=".php">./tests</directory>
</exclude>
</whitelist>
</filter>
<logging>
<!-- and this is where your report will be written -->
<log type="coverage-clover" target="./clover.unit.xml"/>
</logging>
<?xml version="1.0" encoding="utf-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="tests/php/bootstrap.php"
verbose="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory suffix=".php">./lib</directory>
</include>
<report>
<clover outputFile="./clover.unit.xml"/>
</report>
</coverage>
<testsuite name="Tasks app tests">
<directory>./tests/php/unit</directory>
</testsuite>
</phpunit>

View File

@ -1,3 +1,3 @@
<?php
script('tasks', 'tasks-main');
script('tasks', 'tasks-main');