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

        - libapache2-mod-fastcgi
        - libappindicator1
        - fonts-liberation
djfm's avatar
djfm committed
    sauce_connect: true
Thomas Nabord's avatar
Thomas Nabord committed
cache:
  directories:
    - $HOME/.composer/cache
fram's avatar
fram committed
php:
  - 5.4
matrix:
  fast_finish: true
fram's avatar
fram committed

before_install:
  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then sudo cp tests/php7-pool.conf ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/; fi
  - phpenv config-rm xdebug.ini
  - mysql -u root -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
  - echo "always_populate_raw_post_data = -1" >> ~/.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/prestashop.conf
fram's avatar
fram committed
  - sudo cp -Rf . /var/www/prestashop.unit.test
  - sudo chmod 777 -R /var/www/
  - sudo a2dissite 000-default
  - sudo a2ensite prestashop.conf
fram's avatar
fram committed
  - sudo service apache2 restart
  - cp -Rf .composer/* ~/.composer/ & composer global install;
  - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
  - sudo dpkg -i google-chrome*.deb
  - export CHROME_BIN=/usr/bin/google-chrome
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 --prefer-dist --no-interaction --no-progress
  - tests/check_file_syntax.sh
  - bash ./travis-scripts/install-prestashop
djfm's avatar
djfm committed
  - bash ./travis-scripts/backup-prestashop
  - php bin/phpunit -c tests/
  - SYMFONY_DEPRECATIONS_HELPER=disabled php bin/phpunit -c tests/phpunit-admin.xml
  - composer phpunit-sf
djfm's avatar
djfm committed
  - 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
  - bash ./travis-scripts/test-startertheme

after_script:
  - sudo cat /var/log/apache2/error.log
  - google-chrome --version
  - curl http://localhost/prestashop.unit.test/
  - cat /etc/apache2/envvars
  - cat /etc/apache2/sites-available/prestashop.conf
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