This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (59 loc) · 2.14 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
dist: trusty
language: php
cache:
bundler: true
apt: true
directories:
- "$HOME/.composer/cache"
- "$HOME/.drush/cache"
- "$HOME/.npm"
php:
- 7.0
- 7.1
env:
- TEST_TAGS=lightning PROFILE_NAME=lightning
- TEST_TAGS=~search PROFILE_NAME=lightning_extender
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"
# 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';"
# PHP conf tweaks
- 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.
- composer install
# Install Lightning.
- DB_URL='mysql\://lightning:[email protected]/drupal'
- HOST=http://127.0.0.1:8080
- lightning install $DB_URL lightning $HOST
# Reinstall Lightning if we want to run tests on a sub-profile.
- if [ $PROFILE_NAME != 'lightning' ]; then lightning install $DB_URL $PROFILE_NAME $HOST; fi
# Update codebase to head.
- composer nuke
- composer require acquia/lightning:dev-8.x-3.x --no-update
- composer update
# Regenerate Behat configuration, in case testing set-up has changed in HEAD.
- lightning configure:behat $HOST
# Run database and Lightning config updates.
- drush cache-rebuild
- drush updatedb --yes
- drush update:lightning --no-interaction
before_script:
- drush runserver --default-server=builtin 8080 &>/dev/null &
- google-chrome-stable --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 http://localhost &
- drush pm-uninstall --yes history
script:
- behat --strict --stop-on-failure --config .behat.yml --tags=${TEST_TAGS}
matrix:
fast_finish: true