Attempt at improving travis testing and doing an automated Chamilo install

1.10.x
Yannick Warnier 11 years ago
parent 04c42fe32e
commit 303cd995f8
  1. 38
      .travis.yml
  2. 3
      composer.json
  3. 696
      composer.lock
  4. 25
      tests/travis-apache
  5. 4
      tests/travis-php-config.ini

@ -3,13 +3,43 @@ language: php
php:
- 5.4
- 5.5
- 5.6
- 7
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq mysql-server
- sudo apt-get install -qq apache2 libapache2-mod-fastcgi
- sudo apt-get install -qq php5-imagick php5-curl php5-intl php5-json php5-fpm php5-mysql
before_script:
- composer --self-update
- composer self-update
- composer install -n
- composer -v update
- phpenv config-add tests/travis-php-config.ini
# enable php-fpm
- 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
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
- sudo cp -f tests/travis-ci-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
# install Chash, a database, and then install Chamilo
- git clone https://github.com/chamilo/chash
- cd chash
- composer install
- composer update
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq php5-imagick php5-curl php5-intl php5-json
- php5 createPhar.php
- chmod +x chash.phar
- sudo mv chash.phar /usr/local/bin/chash
- cd ..
- mysql -e 'create database chamilo'
- mysql -e 'grant all privileges on chamilo.* to chamilo@localhost identified by "chamilo"'
- mysql -e 'flush privileges'
# install Chamilo with Chash
- sudo chash chash:chamilo_install --silent --sitename="Chamilo" --site_url="http://localhost/" --institution="Chamilo" --institution_url="https://chamilo.org" --encrypt_method="sha1" --firstname="John" --lastname="Doe" --language="english" --driver="pdo_mysql" --host="localhost" --port="3306" --dbname="chamilo" --dbuser="chamilo" --dbpassword="chamilo" --permissions_for_new_directories="0777" --permissions_for_new_files="0666" --username="admin" --password="admin" --email="admin@example.com" --phone="555-5555" 1.10.x $(pwd)
script: phpunit -c tests/phpunit

@ -54,7 +54,8 @@
"sonata-project/user-bundle": "~2.2",
"fxp/composer-asset-plugin": "~1.0",
"behat/behat": "3.0.*@stable",
"behat/behat": "2.4.*@stable",
"behat/mink-extension": "*@stable",
"bower-asset/bootstrap": "3.3.*",
"bower-asset/fontawesome": "4.3.*",

696
composer.lock generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,25 @@
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName localhost
DocumentRoot %TRAVIS_BUILD_DIR%
<Directory "%TRAVIS_BUILD_DIR%">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/localhost-error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/localhost-access.log combined
# 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
</IfModule>
</VirtualHost>

@ -0,0 +1,4 @@
; this file serves to configure the PHP environment on travis-ci.com
; see http://docs.travis-ci.com/user/languages/php/#Custom-PHP-configuration
date.timezone = "Europe/Paris"
phar.readonly = Off
Loading…
Cancel
Save