forked from PrestaShop/PrestaShop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
89 lines (77 loc) · 2.91 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
language: php
services:
- mysql
addons:
apt:
sources:
- deb http://archive.ubuntu.com/ubuntu/ trusty multiverse
- deb http://archive.ubuntu.com/ubuntu/ trusty-updates multiverse
- deb http://archive.ubuntu.com/ubuntu/ trusty universe
- deb http://archive.ubuntu.com/ubuntu/ trusty-updates universe
packages:
- mysql-server-5.6
- mysql-client-5.6
- mysql-client-core-5.6
- apache2
- postfix
- libapache2-mod-fastcgi
- libappindicator1
- fonts-liberation
sauce_connect: true
cache:
directories:
- $HOME/.composer/cache
- $HOME/.npm
sudo: required
dist: trusty
group: edge
php:
- 5.4
- 5.6
- 7.0
matrix:
fast_finish: true
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;'
- 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
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
- sudo cp -f tests/travis-ci-apache-vhost /etc/apache2/sites-available/prestashop.conf
- sudo cp -Rf . /var/www/prestashop.unit.test
- sudo chmod 777 -R /var/www/
- sudo a2dissite 000-default
- sudo a2ensite prestashop.conf
- 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
before_script:
- export CHROME_BIN=/usr/bin/google-chrome
notifications:
slack: prestashop:Eovjydk55zPrwPkoQIOF0cZn
hipchat: ec4e21c5eb82066ba8be5fd1afefde@1184657
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
- bash ./travis-scripts/backup-prestashop
- php bin/phpunit -c tests/
- composer phpunit-sf
- 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
after_failure:
- curl http://localhost/prestashop.unit.test/
- cat /etc/apache2/envvars
- cat /etc/apache2/sites-available/prestashop.conf
- sudo ls -l /var/log/apache2