forked from backdrop/backdrop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (38 loc) · 1.9 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
# Configuration file for running the test suite. Results typically at http://travis-ci.org/backdrop/backdrop
# whitelist
language: php
php:
- 5.3
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 $HOME/.phpenv/versions/`php -r "print PHP_VERSION;"`/etc/php-fpm.conf.default $HOME/.phpenv/versions/`php -r "print PHP_VERSION;"`/etc/php-fpm.conf
- $HOME/.phpenv/versions/`php -r "print PHP_VERSION;"`/sbin/php-fpm
# Install Drush. Newer drush versions won't run site-install because Backdrop
# doesn't match expectations about Drupal 7/8 versions. Drush 5.7 doesn't
# check the version at all, so it works for now.
- pear channel-discover pear.drush.org
- pear install drush/drush-5.7.0
- phpenv rehash
# 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 Drush.
- chmod a+w sites/default
- drush si --db-url=mysql://travis:@localhost/backdrop -y
- chmod go-w sites/default
- drush en simpletest -y
script: php -d display_errors="stderr" ./core/scripts/run-tests.sh --php `which php` --concurrency 12 --url 'http://localhost' --color --all
after_failure:
- echo "Failures detected. Outputing additional logs:"
- sudo cat /var/log/apache2/error.log
- sudo cat /var/log/mysql/error.log