-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (57 loc) · 2.27 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
71
72
73
74
language: php
php:
- 5.5
- 5.6
env:
- DRUPAL_CORE=8.0.x
- DRUPAL_CORE=8.1.x
mysql:
database: rethinkdb
username: root
encoding: utf8
before_script:
# Install rethinkdb
- source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
- wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
- sudo apt-get update
- sudo apt-get install rethinkdb
- rethinkdb > /dev/null &
# Installing composer
- curl -sS https://getcomposer.org/installer | php
- sudo mv composer.phar /usr/local/bin/composer
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- composer self-update
- composer global require drush/drush:8.0.5
# Remove Xdebug as we don't need it and it causes "PHP Fatal error: Maximum
# function nesting level of '256' reached."
# We also don't care if that file exists or not on PHP 7.
- phpenv config-rm xdebug.ini || true
# Remember the current directory for later use in the Drupal installation.
- TESTDIR=$(pwd)
# Navigate out of module directory to prevent blown stack by recursive module
# lookup.
- cd ..
# Create database.
- mysql -e 'create database rethinkdb'
# Export database variable for kernel tests.
- export SIMPLETEST_DB=mysql://root:@127.0.0.1/rethinkdb
# Download Drupal 8 core.
- travis_retry git clone --branch $DRUPAL_CORE --depth 1 https://git.drupal.org/project/drupal.git
- cd drupal
# Install Composer dependencies.
- composer install
- composer require danielmewes/php-rql
# todo: clean after the patch will be applied.
- rm -rf vendor/danielmewes/php-rql
- git clone https://github.com/RoySegall/php-rql.git --depth 1 --branch 144 vendor/danielmewes/php-rql
# Reference OG in the Drupal site.
- ln -s $TESTDIR modules/rethinkdb
# Start a web server on port 8888 in the background.
- nohup php -S localhost:8888 > /dev/null 2>&1 &
# Wait until the web server is responding.
- until curl -s localhost:8888; do true; done > /dev/null
# Export web server URL for browser tests.
- export SIMPLETEST_BASE_URL=http://localhost:8888
script:
# Run the PHPUnit tests which also include the kernel tests.
- ./vendor/phpunit/phpunit/phpunit -c ./core/phpunit.xml.dist ./modules/rethinkdb