123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- dist: bionic
- sudo: required
- language: php
- addons:
- apt:
- packages:
- - apache2
- - postfix
- - libappindicator1
- - fonts-liberation
- services:
- - mysql
- - xvfb
- cache:
- yarn: true
- directories:
- - $HOME/.composer/cache/files
- php:
- - 7.2
- - 7.3
- 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
- - 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
- # Get Selenium
- - wget http://selenium-release.storage.googleapis.com/3.1/selenium-server-standalone-3.1.0.jar
- # Check java
- - 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
- - curl $VHOST_URL
- - mysqld --version
- - apache2 -v
- - php -v
- - php -ini | grep memory_limit
- - sudo cat /etc/hosts
- # Install Chash, a database, and then install Chamilo
- - git clone https://github.com/chamilo/chash
- - cd chash
- - git log -1 # check chash version
- - composer install
- - 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
- - travis_wait 45 composer install
- # 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"
- # Install bundle js/css
- - php bin/console assets:install
- # Permissions
- - sudo chmod -R 777 var/cache var/log var/courses var/upload 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
- # Check chamilo status
- - php -d date.timezone="Europe/Paris" $TRAVIS_BUILD_DIR/chash/chash.php chash:chamilo_status
- # 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
- - curl $VHOST_URL/public
- - curl $VHOST_URL/public/login
- - ls -la public/build
- script:
- - whereis google-chrome-stable
- - google-chrome-stable --version
- - whereis chromedriver
- - chromedriver --version
- - cd tests/behat
- - pwd
- - travis_wait 45 ../../vendor/behat/behat/bin/behat -v
- # - 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=
|