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

services:
  - mysql

addons:
    apt_packages:
        - apache2
        - libapache2-mod-fastcgi
fram's avatar
fram committed
php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
matrix:
  fast_finish: true
  allow_failures:
    - php: 7.0
fram's avatar
fram committed

before_install:
  - mysql -e 'create database prestashop;'
fram's avatar
fram committed
  - 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
fram's avatar
fram committed
  - ~/.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
Francois Gaillard's avatar
Francois Gaillard committed
notifications:
  slack: prestashop:Eovjydk55zPrwPkoQIOF0cZn
  hipchat: ec4e21c5eb82066ba8be5fd1afefde@1184657
fram's avatar
fram committed
script:
  - 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