Skip to content
.travis.yml 2.08 KiB
Newer Older
fram's avatar
fram committed
language: php

    chrome: stable
        - libapache2-mod-fastcgi
        - libappindicator1
        - fonts-liberation
Thomas Nabord's avatar
Thomas Nabord committed
cache:
  directories:
Thomas Nabord's avatar
Thomas Nabord committed
    - $HOME/.composer/cache
fram's avatar
fram committed
php:
  - 7.0
Thomas Nabord's avatar
Thomas Nabord committed
  - 7.2
  global:
    - SYMFONY_DEPRECATIONS_HELPER=disabled
  matrix:
    - PRESTASHOP_TEST_TYPE=lint
    - PRESTASHOP_TEST_TYPE=unit
    - PRESTASHOP_TEST_TYPE=e2e
matrix:
  include:
    - php: 7.1
      env: EXTRA_TESTS=functional
fram's avatar
fram committed
before_install:
Thomas Nabord's avatar
Thomas Nabord committed
  # Apache & php-fpm configuration
  - bash travis-scripts/setup-php-fpm.sh
  - bash travis-scripts/setup-apache.sh
Thomas Nabord's avatar
Thomas Nabord committed
  # PrestaShop configuration
  - cp tests/parameters.yml.travis app/config/parameters.yml
Francois Gaillard's avatar
Francois Gaillard committed
notifications:
  hipchat: ec4e21c5eb82066ba8be5fd1afefde@1184657
fram's avatar
fram committed
script:
  - composer install --prefer-dist --no-interaction --no-progress
Thomas Nabord's avatar
Thomas Nabord committed
  - bash travis-scripts/install-prestashop
  - 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
Thomas Nabord's avatar
Thomas Nabord committed
  - curl -L http://localhost/
Thomas Nabord's avatar
Thomas Nabord committed
  - cat /etc/apache2/sites-available/000-default.conf
  - sudo cat /var/log/php-fpm.log
joce's avatar
joce committed
  - sudo ls -l /var/log/apache2
Thomas Nabord's avatar
Thomas Nabord committed
  - sudo cat /var/log/apache2/other_vhosts_access.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