.travis.yml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. language: php
  2. php:
  3. - 5.4
  4. - 5.5
  5. - 5.6
  6. before_install:
  7. #- sudo apt-get install python-software-properties
  8. #- sudo add-apt-repository ppa:ondrej/php5 -y
  9. - sudo apt-get update -qq
  10. - sudo apt-get install -qq mysql-server
  11. - sudo apt-get install -qq apache2 libapache2-mod-fastcgi
  12. # Install additional PHP packages (check http://docs.travis-ci.com/user/ci-environment/#CI-environment-OS
  13. # for pre-installed packages)
  14. #- sudo apt-get install -qq php5-imagick
  15. # Following http://docs.travis-ci.com/user/languages/php/#PHP-installation,
  16. # php is compiled with --enable-fpm, so no install of FPM is needed.
  17. # However, not installing it generates errors with service php5-fpm restart
  18. # further down (need to use php-fpm without 5)
  19. - sudo apt-get install -qq php5-cli php5-fpm
  20. before_script:
  21. - php5 -v
  22. - php5 -m
  23. - composer self-update
  24. - composer global require "fxp/composer-asset-plugin:1.0.3"
  25. - composer install -n
  26. - composer -v update
  27. - phpenv config-add tests/travis-php-config.ini
  28. # enable php-fpm
  29. - sudo service php-fpm stop
  30. - sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
  31. - sudo a2enmod rewrite actions fastcgi alias
  32. - echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  33. - ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
  34. # configure apache virtual hosts
  35. - sudo cp -f tests/travis-apache /etc/apache2/sites-available/default
  36. - sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
  37. - sudo service apache2 restart
  38. - sudo service php-fpm restart
  39. - php5 -v
  40. # install Chash, a database, and then install Chamilo
  41. - git clone https://github.com/chamilo/chash
  42. - cd chash
  43. - composer install
  44. - composer update
  45. - php5 -d phar.readonly=0 createPhar.php
  46. - chmod +x chash.phar
  47. - sudo mv chash.phar /usr/local/bin/chash
  48. #- cd ..
  49. #- git clone -b nophpversioncheck --single-branch https://github.com/ywarnier/chamilo-cli-install.git
  50. #- cp chamilo-cli-install/chamilo-cli-installer.php main/install/
  51. #- mysql -u root -e 'create database chamilo'
  52. #- sudo chmod -R 0777 app/config app main/default_course_document/images main/lang
  53. #- cd main/install/
  54. #- 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'
  55. #- cd ../..
  56. # install Chamilo with Chash - see reference https://github.com/sonnym/travis-ci-drupal-module-example/blob/master/.travis.yml
  57. - cd /home/travis/build/chamilo/chamilo-lms
  58. - 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
  59. script:
  60. # - phpunit -c tests/phpunit
  61. # pwd shows /home/travis/build/chamilo/chamilo-lms
  62. - cd tests && ../vendor/behat/behat/bin/behat -v
  63. # configure notifications (email, IRC, campfire etc)
  64. notifications:
  65. # IRC notifications - disabled for creating a lot of noise on the channel
  66. irc: "irc.freenode.org#chamilodev"