forked from lemberg/draft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (38 loc) · 1.31 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
dist: xenial
language: php
services:
- mysql
cache:
apt: true
directories:
- "$HOME/.composer/cache"
- "$HOME/.drush/cache"
php:
- 7.1
- 7.2
before_install:
- phpenv config-rm xdebug.ini
- composer self-update
- composer --version
install:
# Return to the Travis build directory.
- cd -
# Copy Travis composer.json to the build directory.
- cp ./lemberg/draft/.travis.composer.json ./composer.json
# Create the MySQL database and add a user for testing.
- mysql -u root -e "CREATE DATABASE drupal; CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'drupal'; GRANT ALL ON drupal.* TO 'drupal'@'localhost';"
# Tweak PHP configuration.
- echo 'sendmail_path = /bin/true' >> drupal.php.ini;
- phpenv config-add drupal.php.ini
- phpenv rehash
# Build the code base.
- composer install --no-interaction --no-progress --no-suggest
# Add Composer's local bin directory to the PATH.
- export PATH="$HOME/.composer/vendor/bin:$(readlink -e ./vendor/bin):$PATH"
# Installation profile must exist within drupal codebase. Symlink it.
- mkdir docroot/profiles
- ln -s $(readlink -e $TRAVIS_BUILD_DIR) docroot/profiles/draft
script:
- drush site:install draft --db-url mysql://drupal:drupal@localhost/drupal --account-name admin --account-pass admin --verbose --yes
matrix:
fast_finish: true