Merge pull request #2073 from nextcloud/fix/noid/server-versions-tested
Adjust server versions to be tested
This commit is contained in:
commit
e3ef9c8500
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
},
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ use \OCP\IRequest;
|
|||
use \OCP\AppFramework\Controller;
|
||||
|
||||
class CollectionsController extends Controller {
|
||||
|
||||
/**
|
||||
* @var CollectionsService
|
||||
*/
|
||||
|
|
|
@ -32,7 +32,6 @@ use \OCP\IRequest;
|
|||
* Controller class for main page.
|
||||
*/
|
||||
class PageController extends Controller {
|
||||
|
||||
/**
|
||||
* @var IInitialStateService
|
||||
*/
|
||||
|
|
|
@ -27,7 +27,6 @@ use \OCP\AppFramework\Controller;
|
|||
use \OCP\IRequest;
|
||||
|
||||
class SettingsController extends Controller {
|
||||
|
||||
/**
|
||||
* @var SettingsService
|
||||
*/
|
||||
|
|
|
@ -30,7 +30,6 @@ use OCP\Dashboard\IWidget;
|
|||
use OCP\IL10N;
|
||||
|
||||
class TasksWidget implements IWidget {
|
||||
|
||||
/**
|
||||
* @var IL10N
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ use OCP\App\IAppManager;
|
|||
use OCP\IConfig;
|
||||
|
||||
class SettingsService {
|
||||
|
||||
/**
|
||||
* @var ?string
|
||||
*/
|
||||
|
|
|
@ -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>
|
||||
|
|
41
phpunit.xml
41
phpunit.xml
|
@ -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>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
script('tasks', 'tasks-main');
|
||||
script('tasks', 'tasks-main');
|
||||
|
|
Loading…
Reference in New Issue