Update master php testing versions
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
1c4f72c9e7
commit
e8fd917145
28
.travis.yml
28
.travis.yml
|
@ -1,9 +1,9 @@
|
|||
sudo: false
|
||||
language: php
|
||||
php:
|
||||
- 7.1
|
||||
- 7.2
|
||||
- 7.3
|
||||
- 7.4snapshot
|
||||
|
||||
addons:
|
||||
apt:
|
||||
|
@ -88,10 +88,10 @@ before_script:
|
|||
- sh -c "pecl config-set preferred_state beta; echo yes | printf "\n" | pecl install imagick;"
|
||||
|
||||
# Disable xdebug when we don't need coverage to speed up testing
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '7.1' ]; then phpenv config-rm xdebug.ini; fi;"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' != 'mysql' ]; then phpenv config-rm xdebug.ini; fi;"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '7.3' ]; then phpenv config-rm xdebug.ini; fi;"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' != 'mysql' ]; then phpenv config-rm xdebug.ini; fi;"
|
||||
# Always install the latest version of the xdebug PHP extension
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then cd build; bash xdebug_install.sh; cd ${TRAVIS_BUILD_DIR}/../${SERVER_FOLDER}/apps/$APP_NAME; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then cd build; bash xdebug_install.sh; cd ${TRAVIS_BUILD_DIR}/../${SERVER_FOLDER}/apps/$APP_NAME; fi"
|
||||
|
||||
# Sets up the PHP composer cache
|
||||
- sh -c "if [ ! -d ${TRAVIS_BUILD_DIR}/travis/php-cache/`php-config --vernum` ]; then mkdir -p ${TRAVIS_BUILD_DIR}/travis/php-cache/`php-config --vernum`; fi;"
|
||||
|
@ -111,26 +111,26 @@ script:
|
|||
# Acceptance tests, using Firefox, without code coverage
|
||||
- php vendor/bin/codecept run acceptance --env firefox
|
||||
# Unit, integration and api tests, without code coverage
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '7.1' ]; then php vendor/bin/codecept run unit,integration,api; fi;"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' != 'mysql' ]; then php vendor/bin/codecept run unit,integration,api; fi;"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '7.3' ]; then php vendor/bin/codecept run unit,integration,api; fi;"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' != 'mysql' ]; then php vendor/bin/codecept run unit,integration,api; fi;"
|
||||
|
||||
# PHP 7.1 ONLY: Unit, integration and api tests with code coverage
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then php vendor/bin/codecept run unit,integration,api --coverage --coverage-xml --coverage-html; fi;"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then php vendor/bin/codecept run unit,integration,api --coverage --coverage-xml --coverage-html; fi;"
|
||||
# We can't use phpdbg only as it doesn't work with the webdriver and we can't use it for some tests only as we can't merge html reports
|
||||
# - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then phpenv config-rm xdebug.ini; phpdbg -qrr vendor/bin/codecept run unit,integration,api --coverage --coverage-xml --coverage-html; fi;"
|
||||
|
||||
after_success:
|
||||
# Send coverage report to Codecov
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then wget https://codecov.io/bash -O codecov.sh; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ] && [ '$TRAVIS_PULL_REQUEST' ]; then bash codecov.sh -B $TRAVIS_BRANCH -C $TRAVIS_COMMIT -P $TRAVIS_PULL_REQUEST -t 739120c2-700d-47c4-845c-c0d0c9c3707d -f tests/_output/coverage.xml; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then bash codecov.sh -B $TRAVIS_BRANCH -C $TRAVIS_COMMIT -t 739120c2-700d-47c4-845c-c0d0c9c3707d -f tests/_output/coverage.xml; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then wget https://codecov.io/bash -O codecov.sh; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ] && [ '$TRAVIS_PULL_REQUEST' ]; then bash codecov.sh -B $TRAVIS_BRANCH -C $TRAVIS_COMMIT -P $TRAVIS_PULL_REQUEST -t 739120c2-700d-47c4-845c-c0d0c9c3707d -f tests/_output/coverage.xml; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then bash codecov.sh -B $TRAVIS_BRANCH -C $TRAVIS_COMMIT -t 739120c2-700d-47c4-845c-c0d0c9c3707d -f tests/_output/coverage.xml; fi"
|
||||
|
||||
# Generate API documentation
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then php vendor/bin/phpdoc run; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then php vendor/bin/phpdoc run; fi"
|
||||
# Generate Wiki documentation
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then git submodule update --init; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then git submodule update --init; fi"
|
||||
# Send documentation to Github Pages
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then cd build/documentation; bash ./docpublisher.sh; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then cd build/documentation; bash ./docpublisher.sh; fi"
|
||||
|
||||
after_failure:
|
||||
- cat tests/_output/phpbuiltinserver.errors.txt
|
||||
|
@ -139,6 +139,6 @@ after_failure:
|
|||
|
||||
matrix:
|
||||
include:
|
||||
- php: 7.1
|
||||
- php: 7.3
|
||||
env: DB=pgsql
|
||||
fast_finish: true
|
||||
|
|
|
@ -34,7 +34,7 @@ class ConfigParserTest extends \OCA\Gallery\Tests\GalleryUnitTest {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->configParser = new ConfigParser();
|
||||
|
|
|
@ -28,7 +28,7 @@ class ConfigValidatorTest extends \OCA\Gallery\Tests\GalleryUnitTest {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->configValidator = new ConfigValidator();
|
||||
|
|
|
@ -22,7 +22,7 @@ use OCA\Gallery\Controller\ConfigApiController;
|
|||
*/
|
||||
class ConfigApiControllerTest extends ConfigControllerTest {
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->controller = new ConfigApiController(
|
||||
$this->appName,
|
||||
|
|
|
@ -60,7 +60,7 @@ class ConfigControllerTest extends \Test\TestCase {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->request = $this->getMockBuilder('\OCP\IRequest')
|
||||
|
|
|
@ -22,7 +22,7 @@ use OCA\Gallery\Controller\ConfigPublicController;
|
|||
*/
|
||||
class ConfigPublicControllerTest extends ConfigControllerTest {
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->controller = new ConfigPublicController(
|
||||
$this->appName,
|
||||
|
|
|
@ -26,7 +26,7 @@ use OCA\Gallery\Service\NotFoundServiceException;
|
|||
*/
|
||||
class FilesApiControllerTest extends FilesControllerTest {
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->controller = new FilesApiController(
|
||||
$this->appName,
|
||||
|
|
|
@ -68,7 +68,7 @@ class FilesControllerTest extends \OCA\Gallery\Tests\GalleryUnitTest {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$app = new Application;
|
||||
|
|
|
@ -22,7 +22,7 @@ use OCA\Gallery\Controller\FilesPublicController;
|
|||
*/
|
||||
class FilesPublicControllerTest extends FilesControllerTest {
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->controller = new FilesPublicController(
|
||||
$this->appName,
|
||||
|
|
|
@ -54,7 +54,7 @@ class PageControllerTest extends \Test\TestCase {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->request = $this->createMock(IRequest::class);
|
||||
|
|
|
@ -30,7 +30,7 @@ class PreviewApiControllerTest extends PreviewControllerTest {
|
|||
/** @var PreviewApiController */
|
||||
protected $controller;
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->controller = new PreviewApiController(
|
||||
$this->appName,
|
||||
|
|
|
@ -66,7 +66,7 @@ class PreviewControllerTest extends \OCA\Gallery\Tests\GalleryUnitTest {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$app = new Application;
|
||||
|
|
|
@ -22,7 +22,7 @@ use OCA\Gallery\Controller\PreviewPublicController;
|
|||
*/
|
||||
class PreviewPublicControllerTest extends PreviewControllerTest {
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->controller = new PreviewPublicController(
|
||||
$this->appName,
|
||||
|
|
|
@ -45,7 +45,7 @@ class EnvironmentTest extends \Test\TestCase {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$app = new Application();
|
||||
|
|
|
@ -37,7 +37,7 @@ abstract class GalleryUnitTest extends \Test\TestCase {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->environment = $this->getMockBuilder('\OCA\Gallery\Environment\Environment')
|
||||
|
|
|
@ -65,7 +65,7 @@ class EnvCheckMiddlewareTest extends \OCA\Gallery\Tests\GalleryUnitTest {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->request = $this->getMockBuilder('\OCP\IRequest')
|
||||
|
|
|
@ -60,7 +60,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->request = $this->getMockBuilder('\OCP\IRequest')
|
||||
|
|
|
@ -36,7 +36,7 @@ class ConfigServiceTest extends \OCA\Gallery\Tests\GalleryUnitTest {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->configParser = $this->getMockBuilder('\OCA\Gallery\Config\ConfigParser')
|
||||
|
|
|
@ -34,7 +34,7 @@ class DownloadServiceTest extends \OCA\Gallery\Tests\GalleryUnitTest {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->service = new DownloadService (
|
||||
|
|
|
@ -36,7 +36,7 @@ class PreviewServiceTest extends \OCA\Gallery\Tests\GalleryUnitTest {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->previewManager = $this->getMockBuilder('\OCP\IPreview')
|
||||
|
|
|
@ -30,7 +30,7 @@ class SearchFolderServiceTest extends \OCA\Gallery\Tests\GalleryUnitTest {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->service = new SearchFolderService (
|
||||
|
|
|
@ -31,7 +31,7 @@ class SearchMediaServiceTest extends \OCA\Gallery\Tests\GalleryUnitTest {
|
|||
/**
|
||||
* Test set up
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->service = new SearchMediaService (
|
||||
|
|
Loading…
Reference in New Issue