|
|
|
dist: trusty
|
|
|
|
sudo: required
|
|
|
|
language: php
|
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- apache2
|
|
|
|
- postfix
|
|
|
|
- libapache2-mod-fastcgi
|
|
|
|
- libappindicator1
|
|
|
|
- fonts-liberation
|
|
|
|
|
|
|
|
services:
|
|
|
|
- mysql
|
|
|
|
|
|
|
|
cache:
|
|
|
|
yarn: true
|
|
|
|
directories:
|
|
|
|
- $HOME/.composer/cache/files
|
|
|
|
|
|
|
|
php:
|
|
|
|
- 7.2
|
|
|
|
- 7.3
|
|
|
|
# - 7.4
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- VHOST_URL=localhost
|
|
|
|
- CHAMILO_VERSION=master
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
# Fix travis error https://github.com/travis-ci/travis-ci/issues/8607
|
|
|
|
- sudo rm -vf /etc/apt/sources.list.d/*riak*
|
|
|
|
# Get Chrome
|
|
|
|
#- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
|
|
|
|
#- sudo apt-get update
|
|
|
|
#- sudo apt-get install google-chrome-stable
|
|
|
|
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
|
|
|
|
# Get Chrome driver
|
|
|
|
- wget https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip && unzip chromedriver_linux64.zip
|
|
|
|
- sudo mv chromedriver /usr/bin
|
|
|
|
- sudo chmod +x /usr/bin/chromedriver
|
|
|
|
# Setup display for Selenium
|
|
|
|
- sh -e /etc/init.d/xvfb start
|
|
|
|
- export DISPLAY=:99.0
|
|
|
|
- sleep 10
|
|
|
|
# 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 -m
|
|
|
|
- php -ini | grep memory_limit
|
|
|
|
- sudo cat /etc/hosts
|
|
|
|
|
|
|
|
install:
|
|
|
|
- composer update --prefer-source --no-interaction
|
|
|
|
# Install bundle js/css
|
|
|
|
- php bin/console assets:install
|
|
|
|
# Permissions
|
|
|
|
- sudo chmod -R 777 var public
|
|
|
|
# Dump js routes
|
|
|
|
- php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
|
|
|
|
- # Install third party js/css libraries
|
|
|
|
- yarn install
|
|
|
|
- ./node_modules/.bin/encore dev
|
|
|
|
# Permissions
|
|
|
|
- sudo chown -R www-data:www-data $TRAVIS_BUILD_DIR
|
|
|
|
- sudo chown -R 775 $TRAVIS_BUILD_DIR
|
|
|
|
- sudo chmod +x /home/travis/build
|
|
|
|
- ls -la public/build
|
|
|
|
|
|
|
|
script:
|
|
|
|
- composer analyse
|
|
|
|
# - travis_wait 45 ../../vendor/behat/behat/bin/behat -v
|
|
|
|
- ../../vendor/behat/behat/bin/behat features/actionInstall.feature
|
|
|
|
- ../../vendor/behat/behat/bin/behat features/adminFillUsers.feature
|
|
|
|
- ../../vendor/behat/behat/bin/behat features/course.feature
|
|
|
|
- ../../vendor/behat/behat/bin/behat features/createUser.feature
|
|
|
|
|
|
|
|
# - sudo cat /var/log/apache2/$VHOST_URL-access.log
|
|
|
|
|
|
|
|
after_failure:
|
|
|
|
- sudo apache2ctl -M
|
|
|
|
- sudo cat /var/log/apache2/error.log
|
|
|
|
|
|
|
|
# configure notifications (email, IRC, campfire etc)
|
|
|
|
notifications:
|
|
|
|
slack:
|
|
|
|
rooms:
|
|
|
|
secure: wlaaOwNt58ENjx2PEciISr4VBRWXp6YfI8TAZgvhDO1H0XpLByRYyktgm/+h6NQWvTEcPGBSFcsIA6K0N8FA52/fdDQFxbe0en+b4q7AGNLdjTRdszfZ4AbIdRngSBFKRmXC5IX0dEx/nGWYp5fRs26QPvgBadpj8M11BnL7qhg=
|