-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
62 lines (57 loc) · 1.88 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
php:
- 5.4
mysql:
database: drupal
username: root
encoding: utf8
# This is for make code abstract, facilitating copy-pasting.
env:
GITHUB_REPOSITORY=drupal7-patch_manager DRUPAL_VERSION=7.x DRUPAL_MODULE=patch_manager
before_script:
- mysql -e 'create database drupal;'
- pyrus channel-discover pear.drush.org
- pyrus install drush/drush-devel
- phpenv rehash
- cd ..
# Get Patchwork library.
- wget --output-document=patchwork.zip https://github.com/antecedent/patchwork/archive/master.zip
- ls -la
- unzip patchwork.zip
- ls -la
- mv patchwork-master patchwork
- ls patchwork -la
# --no-cache is must-have due to http://drupal.org/node/1630220
- drush dl drupal-$DRUPAL_VERSION --no-cache
# Discover newly downloaded directory.
- ls -la
- cd drupal-*
# make sure we are inside Drupal root.
- ls -la
# Install Drupal.
- drush si standard --db-url=mysql://root:@localhost/drupal --yes
- drush en simpletest --yes
# Prepare required modules.
- drush dl libraries --dev --no-cache
- drush en libraries --yes
- mkdir sites/all/libraries
- cp -R ../patchwork sites/all/libraries/patchwork
- ls sites/all/libraries/patchwork -la
- drush dl moopapi --dev --no-cache
- cp -R ../$GITHUB_REPOSITORY sites/all/modules/$DRUPAL_MODULE
- drush en $DRUPAL_MODULE --yes
# To make test file discoverable.
#- ls -la
# Up to Drupal root level.
#- cd ../../../../../
# DEBUG
#- ls -la
- drush cc all
- drush runserver --server=builtin 8080 &
- sleep 4
#- drush vset simpletest_verbose FALSE --yes
- drush vset simpletest_verbose TRUE --yes
script: php scripts/run-tests.sh --php ~/.phpenv/versions/5.4.13/bin/php --url 'http://127.0.0.1:8080' --verbose --file sites/all/modules/$DRUPAL_MODULE/tests/$DRUPAL_MODULE.test
#drush test-run --xml --file=sites/all/modules/moopapi/core/simpletest.test --uri=http://127.0.0.1:8080
after_script:
#- ls sites/default/files -la