-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
70 lines (65 loc) · 2.71 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
66
67
68
69
70
language: php
php:
- 5.4
mysql:
database: drupal
username: root
encoding: utf8
env:
# 6.x
# 6.x-1.x
- GITHUB_REPOSITORY=drupal-botcha DRUPAL_VERSION=6.x PROFILE=default DRUPAL_MODULE=botcha BRANCH=1.x
# (obsolete) 6.x-2.x
#- GITHUB_REPOSITORY=drupal-botcha DRUPAL_VERSION=6.x PROFILE=default DRUPAL_MODULE=botcha BRANCH=2.x
# 6.x-3.x
- GITHUB_REPOSITORY=drupal-botcha DRUPAL_VERSION=6.x PROFILE=default DRUPAL_MODULE=botcha BRANCH=3.x
# 6.x-4.x
- GITHUB_REPOSITORY=drupal-botcha DRUPAL_VERSION=6.x PROFILE=default DRUPAL_MODULE=botcha BRANCH=4.x
# 7.x
# 7.x-1.x
- GITHUB_REPOSITORY=drupal-botcha DRUPAL_VERSION=7.x PROFILE=standard DRUPAL_MODULE=botcha BRANCH=1.x
# (obsolete) 7.x-2.x
#- GITHUB_REPOSITORY=drupal-botcha DRUPAL_VERSION=7.x PROFILE=standard DRUPAL_MODULE=botcha BRANCH=2.x
# 7.x-3.x
- GITHUB_REPOSITORY=drupal-botcha DRUPAL_VERSION=7.x PROFILE=standard DRUPAL_MODULE=botcha BRANCH=3.x
# 7.x-4.x
- GITHUB_REPOSITORY=drupal-botcha DRUPAL_VERSION=7.x PROFILE=standard DRUPAL_MODULE=botcha BRANCH=4.x
before_script:
- mysql -e 'create database drupal;'
- pyrus channel-discover pear.drush.org
- pyrus install drush/drush-devel
- phpenv rehash
- cd ..
# Prepare Drupal.
- mkdir drupal
- cd drupal
- cp ../$GITHUB_REPOSITORY/$DRUPAL_VERSION/drupal.make drupal.make
- drush make drupal.make .
# Discover newly downloaded directory.
- ls -la
# Install Drupal.
- drush si $PROFILE --db-url=mysql://root:@localhost/drupal --yes
# Prepare Simpletest.
- sh -c "if [ '$DRUPAL_VERSION' = '6.x' ]; then cp sites/all/modules/simpletest/run-tests.sh scripts/run-tests.sh; fi"
- drush en simpletest --yes
# Prepare required modules.
- cp ../$GITHUB_REPOSITORY/$DRUPAL_VERSION/$BRANCH/$DRUPAL_MODULE.make $DRUPAL_MODULE.make
- drush make $DRUPAL_MODULE.make . --no-core
# Prepare the module.
# No need: it is done recursively by drush make.
#- drush make sites/all/modules/$DRUPAL_MODULE/$DRUPAL_MODULE.make . --no-core
# Drush in D6 doesn't handle dependencies right.
- sh -c "if [ '$DRUPAL_VERSION' = '7.x' ]; then drush en $DRUPAL_MODULE --yes; else drush php-eval \"module_enable(array($DRUPAL_MODULE));\"; fi"
- drush cc all
- drush runserver --server=builtin 8080 &
- sleep 4
#- drush vset simpletest_verbose FALSE --yes
- drush vset simpletest_verbose TRUE --yes
# Create a directory to output results.
- mkdir results
script: php scripts/run-tests.sh --php ~/.phpenv/versions/5.4.16/bin/php --url 'http://127.0.0.1:8080' --verbose --file sites/all/modules/$DRUPAL_MODULE/tests/$DRUPAL_MODULE.simpletest.test
#drush test-run --xml --file=sites/all/modules/moopapi/core/simpletest.test --uri=http://127.0.0.1:8080
after_script:
- cd results
- ls -la
# Trigger testing of changes at drupal.org