-
-
Notifications
You must be signed in to change notification settings - Fork 556
/
.travis.yml
84 lines (71 loc) · 2.67 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
75
76
77
78
79
80
81
82
83
84
sudo: false
language: php
php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4snapshot
services:
- mysql
matrix:
include:
- php: 5.5.9
dist: trusty
fast_finish: true
allow_failures:
- php: 7.4snapshot
env:
global:
# Paths.
- DRUPAL_PATH="$HOME/drupal8"
- PATH="$PATH:$DRUPAL_PATH/vendor/bin:$HOME/.composer/vendor/bin"
# Suppress deprecation handling.
#- SYMFONY_DEPRECATIONS_HELPER=disabled
mysql:
database: drupal_travis_db
username: root
encoding: utf8
before_script:
- phpenv config-rm xdebug.ini || true
# Set variables.
- |
if [[ "$TRAVIS_PHP_VERSION" == "5.5.9" ]] || [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then
export DRUPAL_BRANCH="8.6.x"
# PHP 5.5.9 on TravisCI has a Sqlite version that fails
# minimum requirements, so we install on MySql instead.
export SIMPLETEST_DB="mysql://root:@localhost/drupal_travis_db#drupalconsole"
export IMAGEMAGICK_MODULE="drupal/imagemagick:^2"
else
export DRUPAL_BRANCH="8.8.x"
export SIMPLETEST_DB="sqlite://localhost/sites/default/files/.ht.sqlite#drupalconsole"
export IMAGEMAGICK_MODULE="drupal/imagemagick:dev-3.x"
fi
# Get Drupal via git, and install it via Composer.
- git clone --depth=5 --branch=$DRUPAL_BRANCH http://git.drupal.org/project/drupal.git $DRUPAL_PATH
- cd $DRUPAL_PATH
- composer install --no-progress --no-suggest
# Require drupal/console from the source just cloned from GitHub.
- cd $TRAVIS_BUILD_DIR
- git checkout -b travisci-run-branch
- cd $DRUPAL_PATH
- |
composer config repositories.travisci-run '{"type": "path", "url": "$TRAVIS_BUILD_DIR", "options": {"symlink": false}}'
- composer require "drupal/console:dev-travisci-run-branch" --no-progress --no-suggest
script:
# Install Drupal site via drupal/console and show site status.
- drupal site:install standard $SIMPLETEST_DB --langcode=en --site-name="Drupal 8 Site Install" [email protected] --account-name=admin [email protected] --account-pass=admin --no-interaction
- drupal module:install --composer token admin_toolbar "$IMAGEMAGICK_MODULE" --verbose --no-interaction
- drupal debug:module
- drupal config:override system.image --key=toolkit --value=imagemagick
- drupal site:status -v
# - cd $DRUPAL_PATH/vendor/drupal/console
# - ../../phpunit/phpunit/phpunit
# - ~/.composer/vendor/bin/phpcs --warning-severity=0 --standard=~/.composer/vendor/drupal/coder/coder_sniffer/Drupal/ruleset.xml $PROJECT_DIR/drupal8.dev/modules/custom/example
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/637685414a0d0ef9d4c6
on_success: change
on_failure: always