12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- sudo: required
- language: php
- php:
- #- 5.4 // Removed because of Chash dependencies on PHP 5.5
- - 5.5
- - 5.6
- services:
- - docker
- before_install:
- #- sudo apt-get install python-software-properties
- #- sudo add-apt-repository ppa:ondrej/php5 -y
- - 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)
- #- sudo apt-get install -qq php5-imagick
- # 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 php5-fpm
- before_script:
- - php5 -v
- - php5 -m
- - composer self-update
- # Previously, fxp/composer-asset-plugin was required but was causing a lot of trouble updating. Now it's disabled.
- #- composer global require "fxp/composer-asset-plugin:1.0.3"
- # You can either use the composer install method and face the Github limit
- #- composer install -n
- - composer -v update
- # ...OR use the proxy repository to download the necessary dependencies
- #- git clone -b 1.10.x --depth=1 https://github.com/ywarnier/chamilo-vendors.git
- #- sudo mv chamilo-vendors/vendor .
- #- sudo mv chamilo-vendors/web .
- #- sudo mv chamilo-vendors/composer.lock .
- #- sudo rm -rf chamilo-vendors
- # Continue...
- - phpenv config-add tests/travis-php-config.ini
- # enable php-fpm
- - sudo /etc/init.d/php5-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
- - ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
- # configure apache virtual hosts
- - 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 php5-fpm restart
- - php5 -v
- # install Chash, a database, and then install Chamilo
- - git clone https://github.com/chamilo/chash
- - cd chash
- - composer install
- - composer update
- - php5 -d phar.readonly=0 createPhar.php
- - chmod +x chash.phar
- - sudo mv chash.phar /usr/local/bin/chash
- #- cd ..
- #- git clone -b nophpversioncheck --single-branch https://github.com/ywarnier/chamilo-cli-install.git
- #- cp chamilo-cli-install/chamilo-cli-installer.php main/install/
- #- mysql -u root -e 'create database chamilo'
- #- sudo chmod -R 0777 app/config app main/default_course_document/images main/lang
- #- cd main/install/
- #- sudo php5 chamilo-cli-installer.php -l admin -p admin -U travis -u 'http://localhost/' -X travis -L english -z 'admin@example.com' -f 'John' -g 'Doe' -b '555-5555' -c 'Test campus' -y 'Chamilo' -x 'https://chamilo.org'
- #- cd ../..
- # install Chamilo with Chash - see reference https://github.com/sonnym/travis-ci-drupal-module-example/blob/master/.travis.yml
- - cd /home/travis/build/chamilo/chamilo-lms
- - sudo chash chash:chamilo_install --no-interaction --sitename="Chamilo" --site_url="http://localhost/" --institution="Chamilo" --institution_url="https://chamilo.org" --encrypt_method="sha1" --firstname="John" --lastname="Doe" --language="english" --driver="mysqlnd" --host="localhost" --port="3306" --dbname="chamilo" --dbuser="root" --permissions_for_new_directories="0777" --permissions_for_new_files="0666" --linux-user="www-data" --linux-group="www-data" --username="admin" --password="admin" --email="admin@example.com" --phone="555-5555" 1.10.x
- script:
- # - phpunit -c tests/phpunit
- # pwd shows /home/travis/build/chamilo/chamilo-lms
- - cd tests && ../vendor/behat/behat/bin/behat -v
- # configure notifications (email, IRC, campfire etc)
- notifications:
- # IRC notifications - disabled for creating a lot of noise on the channel
- irc: "irc.freenode.org#chamilodev"
|