language: php addons: apt: packages: - apache2 - postfix - libapache2-mod-fastcgi - libappindicator1 - fonts-liberation services: - mysql sudo: required dist: trusty cache: directories: - $HOME/.composer/cache/files php: #- 5.4 // Removed because of Chash dependencies on PHP 5.5 - 5.5 - 5.6 - 7.0 env: global: - VHOST_URL=localhost - CHAMILO_VERSION=1.11.x before_install: # Get Chrome - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - - sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' - sudo apt-get update - sudo apt-get install google-chrome-stable # Get Chrome driver - wget https://chromedriver.storage.googleapis.com/2.27/chromedriver_linux64.zip && unzip chromedriver_linux64.zip && sudo mv chromedriver /usr/bin # Setup display for Selenium - sh -e /etc/init.d/xvfb start - export DISPLAY=:99.0 # Get Selenium - wget http://selenium-release.storage.googleapis.com/3.1/selenium-server-standalone-3.1.0.jar # Check java - java -version - sudo apt-get install oracle-java8-installer - java -version - java -jar selenium-server-standalone-3.1.0.jar -log selenium.log > /dev/null & - nohup bash -c "webdriver-manager start 2>&1 &" - sleep 10 # Apache & php-fpm configuration - bash tests/travis/setup-php-fpm.sh - bash tests/travis/setup-apache.sh - mysqld --version - apache2 -v - php -v - sudo cat /etc/hosts - phpenv config-add tests/travis/php-config.ini # Install Chash, a database, and then install Chamilo - git clone https://github.com/chamilo/chash - cd chash - composer update - php -d phar.readonly=0 createPhar.php - chmod +x chash.phar - sudo mv chash.phar /usr/local/bin/chash # Download chamilo - php -d date.timezone="Europe/Paris" chash.php chash:chamilo_install $CHAMILO_VERSION $TRAVIS_BUILD_DIR --download-package --no-interaction --only-download-package - cd $TRAVIS_BUILD_DIR - pwd # Install vendors - composer update # Install chamilo - php -d date.timezone="Europe/Paris" $TRAVIS_BUILD_DIR/chash/chash.php chash:chamilo_install $CHAMILO_VERSION $TRAVIS_BUILD_DIR --no-interaction --sitename="Chamilo" --site_url="http://$VHOST_URL/" --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" - sudo chmod -R 777 app/cache app/logs app/courses app/upload # Check chamilo status - php -d date.timezone="Europe/Paris" $TRAVIS_BUILD_DIR/chash/chash.php chash:chamilo_status - ls -la - ls -la /var/www # Permissions - sudo chown -R www-data:www-data $TRAVIS_BUILD_DIR - sudo chown -R 775 $TRAVIS_BUILD_DIR - sudo chmod +x /home/travis/build - sudo service apache2 restart - curl $VHOST_URL script: - cd tests/behat - travis_wait 45 ../../vendor/behat/behat/bin/behat -v #- sudo cat /var/log/apache2/$VHOST_URL-error.log #- sudo cat /var/log/apache2/$VHOST_URL-access.log # configure notifications (email, IRC, campfire etc) notifications: # IRC notifications - disabled for creating a lot of noise on the channel irc: "irc.freenode.org#chamilodev"