mirror of
https://github.com/netzbegruenung/user_saml.git
synced 2024-05-11 05:06:06 +02:00
Update supported versions and CI
Signed-off-by: Joas Schilling <coding@schilljs.com> Fix unit tests Signed-off-by: Joas Schilling <coding@schilljs.com> adjust CI config - NC 15 is EOL - integration tests need PHP 7.3 Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> add test pipeline for NC 18 Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> go for 18 only Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
292d454e59
commit
005a2fc845
103
.drone.yml
103
.drone.yml
|
@ -46,7 +46,7 @@ steps:
|
|||
- cd tests/unit/
|
||||
- phpunit --configuration phpunit.xml
|
||||
- name: php7.3
|
||||
image: nextcloudci/php7.3:php7.3-1
|
||||
image: nextcloudci/php7.3:php7.3-5
|
||||
environment:
|
||||
APP_NAME: user_saml
|
||||
CORE_BRANCH: master
|
||||
|
@ -81,20 +81,19 @@ trigger:
|
|||
event:
|
||||
- pull_request
|
||||
- push
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: tests-17
|
||||
name: tests-18
|
||||
|
||||
clone:
|
||||
depth: 1
|
||||
|
||||
steps:
|
||||
- name: php7.2-stable17
|
||||
image: nextcloudci/php7.2:php7.2-13
|
||||
- name: php7.3-stable18
|
||||
image: nextcloudci/php7.3:php7.3-5
|
||||
environment:
|
||||
APP_NAME: user_saml
|
||||
CORE_BRANCH: stable17
|
||||
CORE_BRANCH: stable18
|
||||
DB: sqlite
|
||||
commands:
|
||||
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
||||
|
@ -102,10 +101,10 @@ steps:
|
|||
- cd ../server/apps/$APP_NAME
|
||||
- cd tests/unit/
|
||||
- phpunit --configuration phpunit.xml
|
||||
- name: integration-tests-stable16
|
||||
- name: integration-tests-stable18
|
||||
image: nextcloudci/user_saml_shibboleth-php7.2:user_saml_shibboleth_php7.2-2
|
||||
environment:
|
||||
CORE_BRANCH: stable17
|
||||
CORE_BRANCH: stable18
|
||||
commands:
|
||||
- sed -i 's_/etc/init.d/jetty run \&_sleep 4 \&\& /etc/init.d/jetty run \&_' /start.sh
|
||||
- /start.sh &
|
||||
|
@ -127,91 +126,3 @@ trigger:
|
|||
- pull_request
|
||||
- push
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: tests-16
|
||||
|
||||
clone:
|
||||
depth: 1
|
||||
|
||||
steps:
|
||||
- name: php7.1-stable16
|
||||
image: nextcloudci/php7.1:php7.1-16
|
||||
environment:
|
||||
APP_NAME: user_saml
|
||||
CORE_BRANCH: stable16
|
||||
DB: sqlite
|
||||
commands:
|
||||
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
||||
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
||||
- cd ../server/apps/$APP_NAME
|
||||
- cd tests/unit/
|
||||
- phpunit --configuration phpunit.xml
|
||||
- name: integration-tests-stable16
|
||||
image: nextcloudci/user_saml_shibboleth-php7.2:user_saml_shibboleth_php7.2-2
|
||||
environment:
|
||||
CORE_BRANCH: stable16
|
||||
commands:
|
||||
- sed -i 's_/etc/init.d/jetty run \&_sleep 4 \&\& /etc/init.d/jetty run \&_' /start.sh
|
||||
- /start.sh &
|
||||
- sleep 7
|
||||
- rm -rf /var/www/html
|
||||
- cd /var/www/
|
||||
- git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server html
|
||||
- cd /var/www/html && git submodule update --init
|
||||
# use local clone
|
||||
- cp -r /drone/src /var/www/html/apps/user_saml
|
||||
- scl enable rh-php72 "bash -c 'php /var/www/html/occ maintenance:install --database sqlite --admin-pass password; php /var/www/html/occ app:enable user_saml'"
|
||||
- chown -R apache:apache /var/www/html/
|
||||
- scl enable rh-php72 "bash -c 'cd /var/www/html/apps/user_saml/tests/integration && vendor/bin/behat'"
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- pull_request
|
||||
- push
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: tests-15
|
||||
|
||||
clone:
|
||||
depth: 1
|
||||
|
||||
steps:
|
||||
- name: php7.0-stable15
|
||||
image: nextcloudci/php7.0:php7.0-19
|
||||
environment:
|
||||
APP_NAME: user_saml
|
||||
CORE_BRANCH: stable15
|
||||
DB: sqlite
|
||||
commands:
|
||||
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
||||
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
||||
- cd ../server/apps/$APP_NAME
|
||||
- cd tests/unit/
|
||||
- phpunit --configuration phpunit.xml
|
||||
- name: integration-tests-stable15
|
||||
image: nextcloudci/user_saml_shibboleth-php7:user_saml_shibboleth_php7-5
|
||||
environment:
|
||||
CORE_BRANCH: stable15
|
||||
commands:
|
||||
- /start.sh &
|
||||
- sleep 3
|
||||
- rm -rf /var/www/html
|
||||
- cd /var/www/
|
||||
- git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server html
|
||||
- cd /var/www/html && git submodule update --init
|
||||
# use local clone
|
||||
- cp -r /drone/src /var/www/html/apps/user_saml
|
||||
- scl enable rh-php70 "bash -c 'php /var/www/html/occ maintenance:install --database sqlite --admin-pass password; php /var/www/html/occ app:enable user_saml'"
|
||||
- chown -R apache:apache /var/www/html/
|
||||
- scl enable rh-php70 "bash -c 'cd /var/www/html/apps/user_saml/tests/integration && vendor/bin/behat'"
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- pull_request
|
||||
- push
|
||||
|
|
|
@ -33,7 +33,7 @@ While theoretically any other authentication provider implementing either one of
|
|||
<screenshot>https://raw.githubusercontent.com/nextcloud/user_saml/master/screenshots/1.png</screenshot>
|
||||
<screenshot>https://raw.githubusercontent.com/nextcloud/user_saml/master/screenshots/2.png</screenshot>
|
||||
<dependencies>
|
||||
<nextcloud min-version="15" max-version="18" />
|
||||
<nextcloud min-version="18" max-version="18" />
|
||||
</dependencies>
|
||||
<settings>
|
||||
<admin>OCA\User_SAML\Settings\Admin</admin>
|
||||
|
|
|
@ -34,7 +34,7 @@ class ApplicationTest extends \Test\TestCase {
|
|||
/** @var \OCP\AppFramework\IAppContainer */
|
||||
protected $container;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->app = new Application();
|
||||
$this->container = $this->app->getContainer();
|
||||
|
|
|
@ -61,7 +61,7 @@ class SAMLControllerTest extends TestCase {
|
|||
/** @var SAMLController */
|
||||
private $samlController;
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->request = $this->createMock(IRequest::class);
|
||||
|
|
|
@ -35,7 +35,7 @@ class OnlyLoggedInMiddlewareTest extends \Test\TestCase {
|
|||
/** @var OnlyLoggedInMiddleware */
|
||||
private $onlyLoggedInMiddleware;
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
$this->reflector = $this->createMock(IControllerMethodReflector::class);
|
||||
$this->userSession = $this->createMock(IUserSession::class);
|
||||
$this->onlyLoggedInMiddleware = new OnlyLoggedInMiddleware(
|
||||
|
@ -43,7 +43,7 @@ class OnlyLoggedInMiddlewareTest extends \Test\TestCase {
|
|||
$this->userSession
|
||||
);
|
||||
|
||||
return parent::setUp();
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
public function testBeforeControllerWithoutAnnotation() {
|
||||
|
|
|
@ -37,7 +37,7 @@ class AdminTest extends \Test\TestCase {
|
|||
/** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $config;
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
$this->l10n = $this->createMock(IL10N::class);
|
||||
$this->defaults = $this->createMock(Defaults::class);
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
|
@ -48,7 +48,7 @@ class AdminTest extends \Test\TestCase {
|
|||
$this->config
|
||||
);
|
||||
|
||||
return parent::setUp();
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
public function formDataProvider() {
|
||||
|
|
|
@ -32,7 +32,7 @@ class SectionTest extends \Test\TestCase {
|
|||
/** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $urlGenerator;
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
$this->l10n = $this->createMock(\OCP\IL10N::class);
|
||||
$this->urlGenerator = $this->createMock(IURLGenerator::class);
|
||||
$this->section = new \OCA\User_SAML\Settings\Section(
|
||||
|
@ -40,7 +40,7 @@ class SectionTest extends \Test\TestCase {
|
|||
$this->urlGenerator
|
||||
);
|
||||
|
||||
return parent::setUp();
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
public function testGetId() {
|
||||
|
|
|
@ -54,7 +54,7 @@ class UserBackendTest extends TestCase {
|
|||
/** @var \PHPUnit_Framework_MockObject_MockObject|ILogger */
|
||||
private $logger;
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
|
|
Loading…
Reference in a new issue