forked from RESTful-Drupal/restful
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (35 loc) · 1.87 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
language: php
php:
- 5.3
mysql:
database: restful
username: root
encoding: utf8
before_script:
# navigate out of module directory to prevent blown stack by recursive module lookup
- cd ../..
# install drush
- pear channel-discover pear.drush.org
- pear install drush/drush-5.8.0
- phpenv rehash
# install php packages required for running a web server from drush on php 5.3
- sudo apt-get update > /dev/null
- sudo apt-get install -y --force-yes php5-cgi php5-mysql
# create new site, stubbing sendmail path with true to prevent delivery errors and manually resolving drush path
- mysql -e 'create database restful'
- 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/restful --enable=simpletest restful
# reference and enable restful in build site
- ln -s $(readlink -e $(cd -)) restful/drupal/sites/all/modules/restful
- cd restful/drupal
- drush --yes pm-enable restful restful_test
# Download entity validator.
- drush dl entity_validator --dev --yes
# Patch Entity API.
- curl -O https://www.drupal.org/files/issues/2086225-entity-access-check-node-create-3.patch
- patch -p1 /home/travis/build/restful/drupal/sites/all/modules/entity/modules/callbacks.inc < 2086225-entity-access-check-node-create-3.patch
- curl -O https://www.drupal.org/files/issues/2264079-entity-wrapper-access-single-entity-reference-2.patch
- patch -p1 /home/travis/build/restful/drupal/sites/all/modules/entity/includes/entity.wrapper.inc < 2264079-entity-wrapper-access-single-entity-reference-2.patch
# start a web server on port 8080, run in the background; wait for initialization
- drush runserver 127.0.0.1:8080 &
- until netstat -an 2>/dev/null | grep '8080.*LISTEN'; do true; done
script: drush test-run Restful --uri=http://127.0.0.1:8080