Newer
Older
chrome: stable
apt:
packages:
- apache2
- postfix
- 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
env: EXTRA_DEPS=phpHigh PRESTASHOP_TEST_TYPE=unit
- php: 7.2
env: PRESTASHOP_TEST_TYPE=e2e EXTRA_TESTS=functional
- stage: deploy
php: 7.2
before_install: skip
script:
- mkdir -p /tmp/ps-release
- php tools/build/CreateRelease.php --destination-dir=/tmp/ps-release
- cd /tmp/ps-release
&& today=`date +%Y-%m-%d-`; for i in *; do mv $i $today$i; done
&& cd -
if: type = cron
deploy:
provider: gcs
access_key_id: $GCS_ACCESS_KEY
secret_access_key: $GCS_ACCESS_SECRET
bucket: prestashop-core-nightly
skip_cleanup: true
acl: public-read
local-dir: "/tmp/ps-release"
on:
all_branches: true
exclude:
- php: 7.2 # Replaced with additional tests
env: PRESTASHOP_TEST_TYPE=e2e
# Avoid Composer authentication issues
- if [[ $TRAVIS_REPO_SLUG = PrestaShop/PrestaShop ]]; then cp travis-scripts/.composer-auth.json ~/.composer/auth.json; fi;
# 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
- if [ $EXTRA_DEPS = "phpHigh" ]; then
composer update --ignore-platform-reqs;
else
composer install --prefer-dist --no-interaction --no-progress;
fi
- if [ $PRESTASHOP_TEST_TYPE = "lint" ]; then
bash tests/check_file_syntax.sh;
fi
- if [ $PRESTASHOP_TEST_TYPE = "unit" ]; then
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
- sudo cat /var/log/apache2/other_vhosts_access.log
- if [ ! -z "$PRESTASTHOP_SCREENHOST" ]; then bash ./travis-scripts/base64-screenshots; fi # As we cannot upload file, we display the base64 encoded content of the screenshots
- cat $TRAVIS_BUILD_DIR/var/log/dev.log