/
.travis.yml
62 lines (48 loc) · 2.02 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
language: php
sudo: false
php:
- 5.4
- 5.5
- 5.6
mysql:
database: drupal
username: root
encoding: utf8
addons:
apt:
packages:
- php5-cgi
- php5-mysql
install:
# 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
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- composer global require drush/drush:7.0
before_script:
# 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
- 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/drupal --enable=simpletest drupal
# reference and enable apps_entity_restrictions in build site
- ln -s $(readlink -e $(cd -)) drupal/drupal/sites/all/modules/apps_entity_restrictions
- cd drupal/drupal
# Gettin the moudles.
- drush dl restful-7.x-1.6 ctools features
- cd sites/all/modules
- git clone https://github.com/DrupalHub/entity_view_count.git
- cd -
# Enaabling the modules.
- drush --yes pm-enable apps_entity_restrictions apps_entity_restrictions_restful apps_entity_restrictions_reports
# Patch Entity API.
- curl -O https://www.drupal.org/files/issues/2086225-entity-access-check-node-create-3.patch
- patch -p1 sites/all/modules/entity/modules/callbacks.inc < 2086225-entity-access-check-node-create-3.patch
# start a web server on port 8080, run in the background; wait for initialization
- drush runserver 127.0.0.1:8080 > ~/php-server.log 2>&1 &
script:
- php scripts/run-tests.sh --php $(which php) --concurrency 4 --verbose --color --url 127.0.0.1:8080 'Apps entity restrictions' 2>&1 | tee /tmp/simpletest-result.txt
- egrep -i "([1-9]+ fail)|(Fatal error)|([1-9]+ exception)" /tmp/simpletest-result.txt && exit 1
- exit 0