Newer
Older
Thomas N
committed
apt:
packages:
Thomas N
committed
- libapache2-mod-fastcgi
- libappindicator1
- fonts-liberation
sudo: required
dist: trusty
global:
- SYMFONY_DEPRECATIONS_HELPER=disabled
matrix:
- PRESTASHOP_TEST_TYPE=lint
- PRESTASHOP_TEST_TYPE=unit
- PRESTASHOP_TEST_TYPE=e2e
matrix:
include:
- php: 7.1
# Apache & php-fpm configuration
- bash travis-scripts/setup-php-fpm.sh
- bash travis-scripts/setup-apache.sh
# PrestaShop configuration
- cp tests/parameters.yml.travis app/config/parameters.yml
hipchat: ec4e21c5eb82066ba8be5fd1afefde@1184657
- composer install --prefer-dist --no-interaction --no-progress
- if [ $PRESTASHOP_TEST_TYPE = "lint" ]; then
bash tests/check_file_syntax.sh;
php bin/console lint:twig src;
php bin/console lint:twig app;
fi
- if [ $PRESTASHOP_TEST_TYPE = "unit" ]; then
composer run-script phpunit-legacy --timeout=0;
composer run-script phpunit-admin --timeout=0;
composer run-script phpunit-sf --timeout=0;
composer run-script phpunit-controllers --timeout=0;
fi
# run-functional-tests must run before starter theme
- if [ $PRESTASHOP_TEST_TYPE = "e2e" ]; then
bash/travis-scripts/run-selenium-tests;
bash/travis-scripts/run-functional-tests;
bash/travis-scripts/test-startertheme;
fi
after_script:
- sudo cat /var/log/apache2/error.log
after_failure:
- cat /etc/apache2/envvars
- cat /etc/apache2/sites-available/000-default.conf
- sudo cat /var/log/php-fpm.log
- bash ./travis-scripts/base64-screenshots # As we cannot upload file, we display the base64 encoded content of the screenshots
- cat $TRAVIS_BUILD_DIR/var/log/dev.log