mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
adding phpUnit 8.x as dev-requirement and try staring Apache in Travis for CalDAV tests
This commit is contained in:
parent
e360932bdf
commit
b448f9a021
37
.travis.yml
37
.travis.yml
@ -13,25 +13,15 @@ matrix:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
- memcached
|
- memcached
|
||||||
- mysql #we use mariadb instead installed via addons below
|
- mysql
|
||||||
# - postgres
|
# - postgres
|
||||||
|
|
||||||
#addons:
|
|
||||||
# mariadb: '10.0'
|
|
||||||
|
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- sudo apt-get update -qq
|
- sudo apt-get update -qq
|
||||||
- sudo apt-get install -y libpcre3-dev
|
- sudo apt-get install -y libpcre3-dev apache2 libapache2-mod-fastcgi
|
||||||
- case $(phpenv version-name) in
|
- case $(phpenv version-name) in
|
||||||
"5.6")
|
|
||||||
yes "" | pecl install memcache;
|
|
||||||
yes "" | pecl install apcu-4.0.11;
|
|
||||||
yes "" | pecl install igbinary;
|
|
||||||
echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
|
||||||
phpenv config-rm xdebug.ini;
|
|
||||||
;;
|
|
||||||
"7"|"7.0"|"7.1"|"7.2")
|
"7"|"7.0"|"7.1"|"7.2")
|
||||||
yes "" | pecl install apcu;
|
yes "" | pecl install apcu;
|
||||||
echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
||||||
@ -41,17 +31,18 @@ before_script:
|
|||||||
echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
- case $(phpenv version-name) in
|
# enable apache with php-fpm see https://docs.travis-ci.com/user/languages/php/#apache--php
|
||||||
"5.6")
|
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||||
composer require 'phpunit/phpunit:~5.7';
|
- sudo a2enmod rewrite actions fastcgi alias
|
||||||
;;
|
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||||
"7"|"7.0")
|
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
|
||||||
composer require 'phpunit/phpunit:~6';
|
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
|
||||||
;;
|
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
|
||||||
*)
|
# configure apache virtual hosts
|
||||||
composer require --ignore-platform-reqs 'phpunit/phpunit:~7';
|
- sudo cp -f doc/travis-ci-apache.conf /etc/apache2/sites-available/000-default.conf
|
||||||
;;
|
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||||
esac
|
- sudo service apache2 restart
|
||||||
|
- curl -i http://localhost/egroupware/groupdav.php/
|
||||||
- php -m
|
- php -m
|
||||||
- php -i
|
- php -i
|
||||||
- php install-cli.php --ignore-platform-reqs
|
- php install-cli.php --ignore-platform-reqs
|
||||||
|
@ -367,7 +367,7 @@ function function_backtrace($remove=0)
|
|||||||
return $_GET['menuaction'] ? $_GET['menuaction'] : str_replace(EGW_SERVER_ROOT,'',$_SERVER['SCRIPT_FILENAME']);
|
return $_GET['menuaction'] ? $_GET['menuaction'] : str_replace(EGW_SERVER_ROOT,'',$_SERVER['SCRIPT_FILENAME']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!function_exists('lang') || defined('NO_LANG')) // setup declares an own version
|
if (!function_exists('lang') && !defined('NO_LANG')) // setup declares an own version
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* function to handle multilanguage support
|
* function to handle multilanguage support
|
||||||
|
@ -45,12 +45,12 @@
|
|||||||
],
|
],
|
||||||
"config": {
|
"config": {
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "7.0"
|
"php": "7.2"
|
||||||
},
|
},
|
||||||
"sort-packages": true
|
"sort-packages": true
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.0,<=8.0.0alpha1",
|
"php": ">=7.2,<=8.0.0alpha1",
|
||||||
"ext-gd": "*",
|
"ext-gd": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-mysqli": "*",
|
"ext-mysqli": "*",
|
||||||
@ -101,6 +101,8 @@
|
|||||||
"tinymce/tinymce": "^5.0"
|
"tinymce/tinymce": "^5.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"guzzlehttp/guzzle": "^6.5",
|
||||||
|
"phpunit/phpunit": "~8"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
"ext-opcache": "Opcode cache to speed up PHP",
|
"ext-opcache": "Opcode cache to speed up PHP",
|
||||||
|
1756
composer.lock
generated
1756
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -12,6 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// autoloader & check_load_extension
|
// autoloader & check_load_extension
|
||||||
|
define('NO_LANG', true); // do NOT define lang(), as setup/inc/functions.inc.php also defines it
|
||||||
require_once realpath(__DIR__.'/../api/src/loader/common.php');
|
require_once realpath(__DIR__.'/../api/src/loader/common.php');
|
||||||
|
|
||||||
// backward compatibility with PHPunit 5.7
|
// backward compatibility with PHPunit 5.7
|
||||||
|
27
doc/travis-ci-apache.conf
Normal file
27
doc/travis-ci-apache.conf
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<VirtualHost *:80>
|
||||||
|
# https://docs.travis-ci.com/user/languages/php/#apache--php
|
||||||
|
|
||||||
|
DocumentRoot %TRAVIS_BUILD_DIR%
|
||||||
|
|
||||||
|
# tests assume EGroupware to be under /egroupware not docroot
|
||||||
|
Alias /egroupware %TRAVIS_BUILD_DIR%
|
||||||
|
|
||||||
|
<Directory "%TRAVIS_BUILD_DIR%/">
|
||||||
|
Options FollowSymLinks MultiViews ExecCGI
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# Wire up Apache to use Travis CI's php-fpm.
|
||||||
|
<IfModule mod_fastcgi.c>
|
||||||
|
AddHandler php5-fcgi .php
|
||||||
|
Action php5-fcgi /php5-fcgi
|
||||||
|
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
||||||
|
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
|
||||||
|
|
||||||
|
<Directory /usr/lib/cgi-bin>
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
</VirtualHost>
|
Loading…
Reference in New Issue
Block a user