Newer
Older
services:
- mysql
addons:
apt_packages:
- apache2
- libapache2-mod-fastcgi
- mysql -e 'create database prestashop;'
- cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "memory_limit = 512M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "always_populate_raw_post_data = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
- sudo cp -f tests/travis-ci-apache-vhost /etc/apache2/sites-available/default
- sudo cp -Rf . /var/www/prestashop.unit.test
- sudo chmod 777 -R /var/www/
- sudo service apache2 restart
before_script:
- phpenv config-rm xdebug.ini
- "mkdir -p ~/.composer"
- cp .travis.composer.config.json ~/.composer/config.json
- sudo service postfix stop
- smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
- echo -e '#!/usr/bin/env bash\nexit 0' | sudo tee /usr/sbin/sendmail
- echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' | sudo tee "/home/travis/.phpenv/versions/`php -i | grep "PHP Version" | head -n 1 | grep -o -P '\d+\.\d+\.\d+.*'`/etc/conf.d/sendmail.ini"
notifications:
slack: prestashop:Eovjydk55zPrwPkoQIOF0cZn
hipchat: ec4e21c5eb82066ba8be5fd1afefde@1184657
- cd /var/www/prestashop.unit.test && cp tests/parameters.yml.travis app/config/parameters.yml
- composer install --no-interaction --no-progress
- tests/check_php_parse_errors.sh
- bash ./travis-scripts/install-prestashop
- php bin/phpunit -c tests/
- composer phpunit-sf
- cd $TRAVIS_BUILD_DIR # because /var/www/prestashop.unit.test (cwd) is about to be deleted
- bash ./travis-scripts/restore-backup
- bash ./travis-scripts/run-selenium-tests
after_script:
- sudo cat /var/log/apache2/error.log