Skip to content

Commit e77525b

Browse files
author
Roy Segall
committed
Update travis infrastructure.
1 parent 0bd0e6e commit e77525b

File tree

1 file changed

+32
-21
lines changed

1 file changed

+32
-21
lines changed

.travis.yml

+32-21
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,51 @@
11
language: php
2+
sudo: false
23

34
php:
4-
- 5.3
5+
- 5.4
6+
- 5.5
7+
- 5.6
58

69
mysql:
710
database: message
811
username: root
912
encoding: utf8
1013

11-
before_script:
12-
# navigate out of module directory to prevent blown stack by recursive module
13-
# lookup
14-
- cd ../..
14+
addons:
15+
apt:
16+
packages:
17+
- php5-cgi
18+
- php5-mysql
19+
20+
install:
1521

16-
# install drush
17-
- pear channel-discover pear.drush.org
18-
- pear install drush/drush-5.8.0
19-
- phpenv rehash
22+
# Add composer's global bin directory to the path
23+
# See: https://github.com/drush-ops/drush#install---composer
24+
- export PATH="$HOME/.composer/vendor/bin:$PATH"
2025

21-
# install php packages required for running a web server from drush on php 5.3
22-
- sudo apt-get update > /dev/null
23-
- sudo apt-get install -y --force-yes php5-cgi php5-mysql
26+
# Install drush globally
27+
- composer global require drush/drush:7.0
28+
29+
before_script:
30+
# Navigate out of module directory to prevent blown stack by recursive module
31+
# lookup.
32+
- cd ../..
2433

25-
# create new site, stubbing sendmail path with true to prevent delivery errors
34+
# Create new site, stubbing sendmail path with true to prevent delivery errors
2635
# and manually resolving drush path
2736
- mysql -e 'create database message'
28-
- php -d sendmail_path=`which true` `pear config-get php_dir`/drush/drush.php --yes core-quick-drupal --profile=testing --no-server --db-url=mysql://root:@127.0.0.1/message --enable=simpletest message
37+
- php -d sendmail_path=`which true` ~/.composer/vendor/bin/drush.php --yes core-quick-drupal --profile=testing --no-server --db-url=mysql://root:@127.0.0.1/message --enable=simpletest message
2938

30-
# reference and enable message in build site
39+
# Reference and enable message in build site.
3140
- ln -s $(readlink -e $(cd -)) message/drupal/sites/all/modules/message
3241
- cd message/drupal
33-
- drush --yes pm-enable message_example
42+
- drush dl entity ctools features views token
43+
- drush --yes pm-enable message message_example
3444

35-
# start a web server on port 8080, run in the background; wait for
36-
# initialization
37-
- drush runserver 127.0.0.1:8080 &
38-
- until netstat -an 2>/dev/null | grep '8080.*LISTEN'; do true; done
45+
# Start a web server on port 8080, run in the background.
46+
- drush runserver 127.0.0.1:8080 > ~/php-server.log 2>&1 &
3947

40-
script: drush test-run Message --uri=http://127.0.0.1:8080
48+
script:
49+
- php scripts/run-tests.sh --php $(which php) --concurrency 4 --verbose --color --url 127.0.0.1:8080 Message 2>&1 | tee /tmp/simpletest-result.txt
50+
- egrep -i "([1-9]+ fail)|(Fatal error)|([1-9]+ exception)" /tmp/simpletest-result.txt && exit 1
51+
- exit 0

0 commit comments

Comments
 (0)