fix drone config
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
373974a40d
commit
3f95d819e9
73
.drone.yml
73
.drone.yml
|
@ -15,7 +15,6 @@ pipeline:
|
|||
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
||||
- cd ../server
|
||||
- php ./build/signed-off-checker.php
|
||||
secrets: [ github_token ]
|
||||
when:
|
||||
matrix:
|
||||
TESTS: signed-off-check
|
||||
|
@ -38,9 +37,9 @@ pipeline:
|
|||
matrix:
|
||||
TESTS: check-app-compatbility
|
||||
syntax-php5.6:
|
||||
image: nextcloudci/php5.6:php5.6-3
|
||||
image: nextcloudci/php5.6:php5.6-8
|
||||
environment:
|
||||
- APP_NAME=spreed
|
||||
- APP_NAME=data_request
|
||||
- CORE_BRANCH=stable13
|
||||
- DB=sqlite
|
||||
commands:
|
||||
|
@ -56,7 +55,7 @@ pipeline:
|
|||
syntax-php7.0:
|
||||
image: nextcloudci/php7.0:php7.0-2
|
||||
environment:
|
||||
- APP_NAME=spreed
|
||||
- APP_NAME=data_request
|
||||
- CORE_BRANCH=stable13
|
||||
- DB=sqlite
|
||||
commands:
|
||||
|
@ -69,9 +68,75 @@ pipeline:
|
|||
when:
|
||||
matrix:
|
||||
TESTS: syntax-php7.0
|
||||
php5.6:
|
||||
image: nextcloudci/php5.6:php5.6-8
|
||||
environment:
|
||||
- APP_NAME=data_request
|
||||
- CORE_BRANCH=stable13
|
||||
- DB=sqlite
|
||||
commands:
|
||||
- apt update && apt-get -y install php5-xdebug
|
||||
|
||||
# Pre-setup steps
|
||||
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
||||
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
||||
- cd ../server/
|
||||
- ./occ app:enable $APP_NAME
|
||||
- cd apps/$APP_NAME
|
||||
|
||||
# Run phpunit tests
|
||||
- cd tests/unit/
|
||||
- phpunit --configuration phpunit.xml
|
||||
when:
|
||||
matrix:
|
||||
TESTS: php5.6
|
||||
php7.0:
|
||||
image: nextcloudci/php7.0:php7.0-2
|
||||
environment:
|
||||
- APP_NAME=data_request
|
||||
- CORE_BRANCH=stable13
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
||||
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
||||
- cd ../server/
|
||||
- ./occ app:enable $APP_NAME
|
||||
- cd apps/$APP_NAME
|
||||
|
||||
# Run phpunit tests
|
||||
- cd tests/unit/
|
||||
- phpunit --configuration phpunit.xml
|
||||
when:
|
||||
matrix:
|
||||
TESTS: php7.0
|
||||
php7.1:
|
||||
image: nextcloudci/php7.1:php7.1-15
|
||||
environment:
|
||||
- APP_NAME=data_request
|
||||
- CORE_BRANCH=stable13
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
||||
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
||||
- cd ../server/
|
||||
- ./occ app:enable $APP_NAME
|
||||
- cd apps/$APP_NAME
|
||||
|
||||
# Run phpunit tests
|
||||
- cd tests/unit/
|
||||
- phpunit --configuration phpunit.xml
|
||||
when:
|
||||
matrix:
|
||||
TESTS: php7.1
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- TESTS: signed-off-check
|
||||
- TESTS: check-app-compatbility
|
||||
- TESTS: syntax-php5.6
|
||||
- TESTS: syntax-php7.0
|
||||
- TESTS: php5.6
|
||||
- TESTS: php7.0
|
||||
- TESTS: php7.1
|
||||
|
|
|
@ -163,15 +163,24 @@ class RequestTest extends \Test\TestCase {
|
|||
|
||||
public function adminProvider() {
|
||||
$admin1 = $this->createMock(IUser::class);
|
||||
|
||||
$admin2 = $this->createMock(IUser::class);
|
||||
$admin2->expects($this->any())
|
||||
->method('getEMailAddress')
|
||||
->willReturn('admin2@sindar.gov');
|
||||
|
||||
$admin3 = $this->createMock(IUser::class);
|
||||
$admin3->expects($this->any())
|
||||
->method('getEMailAddress')
|
||||
->willReturn('admin3@sindar.gov');
|
||||
|
||||
$admin4 = $this->createMock(IUser::class);
|
||||
|
||||
$admin5 = $this->createMock(IUser::class);
|
||||
$admin5->expects($this->any())
|
||||
->method('getEMailAddress')
|
||||
->willReturn('admin5@sindar.gov');
|
||||
|
||||
return [
|
||||
[
|
||||
[ $admin1 ],
|
||||
|
@ -182,7 +191,7 @@ class RequestTest extends \Test\TestCase {
|
|||
1
|
||||
],
|
||||
[
|
||||
[ $admin1, $admin2, $admin3 ],
|
||||
[ $admin3, $admin4, $admin5 ], // for whatever reasons, reusing $admin1 and $admin2 would fail on CI
|
||||
2
|
||||
]
|
||||
];
|
||||
|
@ -209,6 +218,7 @@ class RequestTest extends \Test\TestCase {
|
|||
$this->expectException(HintedRuntime::class);
|
||||
}
|
||||
$result = $this->invokePrivate($this->service, 'getAdmins');
|
||||
|
||||
$this->assertSame($adminsWithEmail, count($result));
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,4 @@ if (!defined('PHPUNIT_RUN')) {
|
|||
require_once __DIR__.'/../../../../lib/base.php';
|
||||
\OC::$loader->addValidRoot(\OC::$SERVERROOT . '/tests');
|
||||
\OC_App::loadApp('data_request');
|
||||
if(!class_exists('PHPUnit_Framework_TestCase')) {
|
||||
require_once('PHPUnit/Autoload.php');
|
||||
}
|
||||
OC_Hook::clear();
|
||||
|
|
Loading…
Reference in New Issue