forked from acquia/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (62 loc) · 2.41 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
dist: trusty
language: php
cache:
bundler: true
directories:
- "$HOME/.composer/cache"
- "$HOME/.drush/cache"
- "$HOME/.npm"
php:
- 7.0
env:
- VERSION=HEAD
- VERSION=3.2.0
# The final CI slot should be used to test the update path from the oldest
# available database fixture.
- VERSION=3.0.0
addons:
chrome: stable
before_install:
- phpenv config-rm xdebug.ini
- composer self-update
- composer --version
- google-chrome-stable --version
install:
# Add Composer's local bin directory to the PATH so that we will be running
# our installed versions of Drush, PHPCS, Behat, PhantomJS, etc.
- export PATH="$HOME/.composer/vendor/bin:$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
# composer install should fail on bad patches.
- export COMPOSER_EXIT_ON_PATCH_FAILURE=1
# Create the MySQL database and add a user for testing.
- mysql -u root -e "CREATE DATABASE drupal; CREATE USER 'lightning'@'localhost' IDENTIFIED BY 'lightning'; GRANT ALL ON drupal.* TO 'lightning'@'localhost';"
# Install the PECL YAML extension for strict parsing. yes is used to
# acknowledge all prompts.
- yes '' | pecl install yaml
# Tweak PHP configuration.
- echo 'max_execution_time = 120' >> drupal.php.ini;
- echo 'sendmail_path = /bin/true' >> drupal.php.ini;
- phpenv config-add drupal.php.ini
- phpenv rehash
# Build the Lightning code base with the latest dependencies.
- composer update
# Install Lightning cleanly so that settings.php will be created properly.
- lightning install --from-config 'mysql\://lightning:[email protected]/drupal' lightning 'http://127.0.0.1:8080'
# Restore and update from the previous version.
- lightning update $VERSION
- drush cache:rebuild
before_script:
- drush config:set system.date timezone.default $TZ --yes
- drush runserver --default-server=builtin 8080 &>/dev/null &
- google-chrome-stable --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 http://localhost &
# Disable the History module during testing, to prevent weird deadlock errors that don't
# actually affect anything.
- drush pm-uninstall --yes history
script:
- composer validate composer.json --no-check-all --ansi --no-interaction
- behat --config .behat.yml --stop-on-failure
- cd docroot
- phpunit --configuration ./core --group lightning,profiles
after_failure:
- drush watchdog:show --count=100 --severity=Error --extended
matrix:
fast_finish: true