Travis-ci test php stuff

1.10.x
Yannick Warnier 11 years ago
parent 5d9487f491
commit 2505071c8b
  1. 12
      .travis.yml
  2. 5
      main/install/install.lib.php

@ -11,9 +11,14 @@ before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq mysql-server
- sudo apt-get install -qq apache2 libapache2-mod-fastcgi
# Install additional PHP packages (check http://docs.travis-ci.com/user/ci-environment/#CI-environment-OS for pre-installed packages)
# Install additional PHP packages (check http://docs.travis-ci.com/user/ci-environment/#CI-environment-OS
# for pre-installed packages)
#- sudo apt-get install -qq php5-imagick
- sudo apt-get install -qq php5-cli php5-fpm
# Following http://docs.travis-ci.com/user/languages/php/#PHP-installation,
# php is compiled with --enable-fpm, so no install of FPM is needed.
# However, not installing it generates errors with service php5-fpm restart
# further down (need to use php-fpm without 5)
- sudo apt-get install -qq php5-cli
before_script:
- php5 -v
@ -24,7 +29,7 @@ before_script:
- composer -v update
- phpenv config-add tests/travis-php-config.ini
# enable php-fpm
- sudo service php5-fpm stop
- sudo service php-fpm stop
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
@ -33,6 +38,7 @@ before_script:
- sudo cp -f tests/travis-apache /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
- sudo service apache2 restart
- sudo service php-fpm restart
- php5 -v
# install Chash, a database, and then install Chamilo
- git clone https://github.com/chamilo/chash

@ -1852,7 +1852,8 @@ function installSettings(
$allowRegistration = $allowRegistration ? 'true' : 'false';
$allowTeacherSelfRegistration = $allowTeacherSelfRegistration ? 'true' : 'false';
$settings = [
// Use PHP 5.3 to avoid issue with weird peripherical auto-installers like travis-ci
$settings = array(
'Institution' => $organizationName,
'InstitutionUrl' => $organizationUrl,
'siteName' => $siteName,
@ -1862,7 +1863,7 @@ function installSettings(
'platformLanguage' => $language,
'allow_registration' => $allowRegistration,
'allow_registration_as_teacher' => $allowTeacherSelfRegistration,
];
);
foreach ($settings as $variable => $value) {
$sql = "UPDATE settings_current

Loading…
Cancel
Save