forked from fago/rules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (53 loc) · 2.22 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
language: php
php:
- 5.4
- 5.5
- 5.6
mysql:
database: rules
username: root
encoding: utf8
before_install:
- sudo apt-get update > /dev/null
install:
# Install php packages required for running a web server from drush.
- sudo apt-get install -y --force-yes php5-cgi php5-mysql
# Add composer's global bin directory to the path.
# @see: https://github.com/drush-ops/drush#install---composer
- export PATH="$HOME/.composer/vendor/bin:$PATH"
# install drush globally
- composer global require drush/drush:dev-master
- composer global require youngj/httpserver:dev-master
before_script:
# Remove Xdebug as we don't need it and it causes
# PHP Fatal error: Maximum function nesting level of '256' reached
- phpenv config-rm xdebug.ini
# Remember the current rules test directory for later use in the Drupal
# installation.
- TESTDIR=$(pwd)
# Navigate out of module directory to prevent blown stack by recursive module
# lookup.
- cd ..
# Create new site, stubbing sendmail path with true to prevent delivery errors
# and manually resolving drush path.
- mysql -e 'create database rules'
# Download Drupal 8 core.
- wget -q -O - http://ftp.drupal.org/files/projects/drupal-8.0.x-dev.tar.gz | tar xz
- cd drupal-8.0.x-dev
# Apply patch so that run-tests.sh returns error code when executing Simpletests.
- wget -q -O - https://www.drupal.org/files/issues/2189345.patch | patch -p1
# Install Drupal.
- php -d sendmail_path=`which true` ~/.composer/vendor/bin/drush.php --yes site-install --db-url=mysql://root:@127.0.0.1/rules testing
# Reference and enable rules in build site.
- ln -s $TESTDIR modules/rules
- drush --yes pm-enable simpletest rules
# Start a web server on port 8080, run in the background; wait for
# initialization. This is temporarly disabled since there are no web tests
# yet.
#- drush runserver 127.0.0.1:8080 &
#- until netstat -an 2>/dev/null | grep '8080.*LISTEN'; do true; done
script:
# Run the Simpletests for Rules.
- php ./core/scripts/run-tests.sh --php `which php` --concurrency 12 --url http://127.0.0.1:8080 --verbose --color "rules"
# Run the PHPUnit tests.
- ./core/vendor/phpunit/phpunit/phpunit -c ./core/phpunit.xml.dist ./modules/rules