.travis.yml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. language: php
  2. php:
  3. - 5.4
  4. - 5.5
  5. - 5.6
  6. before_install:
  7. - sudo apt-get update -qq
  8. - sudo apt-get install -qq mysql-server
  9. - sudo apt-get install -qq apache2 libapache2-mod-fastcgi
  10. - sudo apt-get install -qq php5-imagick php5-curl php5-intl php5-json php5-fpm php5-mysql php5-cli
  11. before_script:
  12. - php5 -v
  13. - composer self-update
  14. - composer global require "fxp/composer-asset-plugin:1.0.0"
  15. - composer install -n
  16. - composer -v update
  17. - phpenv config-add tests/travis-php-config.ini
  18. # enable php-fpm
  19. - sudo service php5-fpm stop
  20. - sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
  21. - sudo a2enmod rewrite actions fastcgi alias
  22. - echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  23. - ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
  24. # configure apache virtual hosts
  25. - sudo cp -f tests/travis-apache /etc/apache2/sites-available/default
  26. - sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
  27. - sudo service apache2 restart
  28. # install Chash, a database, and then install Chamilo
  29. - git clone https://github.com/chamilo/chash
  30. - cd chash
  31. - composer install
  32. - composer update
  33. - php5 -d phar.readonly=0 createPhar.php
  34. - chmod +x chash.phar
  35. - sudo mv chash.phar /usr/local/bin/chash
  36. #- cd ..
  37. #- git clone -b nophpversioncheck --single-branch https://github.com/ywarnier/chamilo-cli-install.git
  38. #- cp chamilo-cli-install/chamilo-cli-installer.php main/install/
  39. #- mysql -u root -e 'create database chamilo'
  40. #- sudo chmod -R 0777 app/config app main/default_course_document/images main/lang
  41. #- cd main/install/
  42. #- 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'
  43. #- cd ../..
  44. # install Chamilo with Chash - see reference https://github.com/sonnym/travis-ci-drupal-module-example/blob/master/.travis.yml
  45. - cd /home/travis/build/chamilo/chamilo-lms
  46. - 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="pdo_mysql" --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
  47. script:
  48. # - phpunit -c tests/phpunit
  49. # pwd shows /home/travis/build/chamilo/chamilo-lms
  50. - cd tests && ../vendor/behat/behat/bin/behat -v
  51. # configure notifications (email, IRC, campfire etc)
  52. notifications:
  53. # IRC notifications - disabled for creating a lot of noise on the channel
  54. irc: "irc.freenode.org#chamilodev"