forked from bartfeenstra/drupal-currency
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (49 loc) · 1.54 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
notifications:
email: [email protected]
language: php
sudo: false
php:
- 5.5
- 5.6
- 7
- hhvm
addons:
hosts:
- local.dev
env:
global:
- BUILD_DIR=$TRAVIS_BUILD_DIR/../build
matrix:
fast_finish: true
allow_failures:
- php: hhvm
mysql:
database: drupal
encoding: utf8
cache:
directories:
- $HOME/.composer/cache
before_install:
- composer self-update
- git config --global github.accesstoken $GITHUB_OAUTH_TOKEN
install:
# Build Drupal and add the package under test as a dependency.
- cp -R $TRAVIS_BUILD_DIR/travis-ci/build $BUILD_DIR
- cd $BUILD_DIR
- composer install
- mkdir ./web/profiles
# Install Drupal and Simpletest.
- cd $BUILD_DIR/web
- /usr/bin/env PHP_OPTIONS="-d sendmail_path=`which true`" ../vendor/bin/drush si --db-url=mysql://root:@localhost:/drupal testing -y
- ../vendor/bin/drush en simpletest -y
# Start a web server.
- cd $BUILD_DIR/web
- ../vendor/bin/drush runserver 127.0.0.1:8080 &
script:
# Run unit and kernel tests.
- export SIMPLETEST_DB="mysql://[email protected]/drupal"
- $BUILD_DIR/vendor/bin/phpunit -c $TRAVIS_BUILD_DIR/phpunit.xml.dist --bootstrap $BUILD_DIR/web/core/tests/bootstrap.php --verbose --debug
# Run web tests and legacy kernel tests.
- cd $BUILD_DIR/web
- php ./core/scripts/run-tests.sh --url http://local.dev:8080 --php $(which php) --verbose --color --types "Simpletest" --module currency
- php ./core/scripts/run-tests.sh --url http://local.dev:8080 --php $(which php) --verbose --color --types "Simpletest" --module currency_intl