forked from formapro/JsFormValidatorBundle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
53 lines (42 loc) · 2.12 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
language: php
php: [5.5,5.6,7.0]
env:
- SF_VERSION='~3.0.0'
before_script:
- export WEB_FIXTURES_HOST=http://localhost/index.php
- sh -e /etc/init.d/xvfb start
- export DISPLAY=:99.0
- sleep 4
- curl -sS https://getcomposer.org/installer | php
- php -d memory_limit=-1 composer.phar require "symfony/symfony:${SF_VERSION}"
- php -d memory_limit=-1 composer.phar install -n
- php -d memory_limit=-1 composer.phar info -i
- Tests/app/console assets:install -v Tests/app || Tests/app/console assets:install -v Tests/app
- Tests/app/console assetic:dump -v Tests/app
- sudo chmod -R 0777 Tests/app/cache Tests/app/logs
- sudo chmod 0777 Resources/public/js
# just show the current directory tree
- ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
- sudo apt-get update > /dev/null
- sudo apt-get install -y --force-yes apache2 libapache2-mod-fastcgi > /dev/null
# enable php-fpm
- if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf; fi
- sudo 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
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
- sudo cp -f Tests/app/Resources/travis-ci-apache /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)/Tests/app?g" --in-place /etc/apache2/sites-available/default
- sudo /etc/init.d/apache2 restart || (sudo cat /var/log/apache2/error.log && exit 1)
- vendor/bin/selenium-server-standalone &> Tests/app/logs/selenium.log &
- sleep 4
script: ./vendor/bin/phpunit -v --debug
#after_script:
# - php vendor/bin/coveralls -v
after_failure:
- cat Tests/app/logs/selenium.log
- cat Tests/app/logs/apache-access.log
- cat Tests/app/logs/apache-error.log
- cat Tests/app/logs/cgi.log
- firefox-bin -v