forked from backdrop/backdrop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
41 lines (36 loc) · 1.66 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
# Configuration file for running the test suite. Results typically at http://travis-ci.org/backdrop/backdrop
language: php
sudo: required
dist: precise
group: legacy
php:
- 5.3
- 7.0
before_script:
# Install Apache and FastCGI extension to connect to PHP-FPM.
- sudo apt-get update > /dev/null
- sudo apt-get install apache2 libapache2-mod-fastcgi > /dev/null
- sudo a2enmod rewrite actions fastcgi alias
- sudo cp -f core/misc/travis-ci/vhost.conf /etc/apache2/sites-available/default
- sudo sed -i -e "s,/var/www,`pwd`,g" /etc/apache2/sites-available/default
- sudo apachectl restart
# Start PHP-FPM. There is no process manager available to start PHP-FPM on
# Travis CI currently, so we have to locate and enable it manually.
- sudo cp core/misc/travis-ci/php-fpm.conf $HOME/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- $HOME/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# Disable XDebug to speed up execution.
- phpenv config-rm xdebug.ini
# Import the PHP configuration.
- phpenv config-add core/misc/travis-ci/php.ini
# Set MySQL configuration and create the database.
- mysql -e 'SET GLOBAL wait_timeout = 5400;'
- mysql -e 'create database backdrop;'
# Install Backdrop with the installation script.
- chmod a+w . settings.php
- ./core/scripts/install.sh --db-url=mysql://travis:@127.0.0.1/backdrop
- chmod go-w . settings.php
script: php -d display_errors="stderr" ./core/scripts/run-tests.sh --concurrency 12 --url 'http://localhost' --color --verbose --force --all
after_failure:
- echo "Failures detected. Outputing additional logs:"
- sudo cat /var/log/apache2/error.log
- sudo cat /var/log/mysql/error.log