@@ -3,42 +3,74 @@ sudo: false
3
3
language : php
4
4
5
5
php :
6
- - 5.5.9
7
6
- 5.6
8
7
- 7.0
9
8
- 7.1
10
9
- 7.2
11
10
- 7.3
12
- - hhvm
11
+ - 7.4snapshot
12
+
13
+ services :
14
+ - mysql
13
15
14
16
matrix :
17
+ include :
18
+ - php : 5.5.9
19
+ dist : trusty
15
20
fast_finish : true
16
21
allow_failures :
17
- - php : hhvm
22
+ - php : 7.4snapshot
18
23
19
24
env :
20
25
global :
21
- - PROJECT_DIR=/home/project
26
+ # Paths.
27
+ - DRUPAL_PATH="$HOME/drupal8"
28
+ - PATH="$PATH:$DRUPAL_PATH/vendor/bin:$HOME/.composer/vendor/bin"
29
+
30
+ # Suppress deprecation handling.
31
+ # - SYMFONY_DEPRECATIONS_HELPER=disabled
32
+
33
+ mysql :
34
+ database : drupal_travis_db
35
+ username : root
36
+ encoding : utf8
22
37
23
38
before_script :
24
- - phpenv config-rm xdebug.ini
25
- # This fixes a fail when install Drupal.
26
- - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
27
- - composer self-update
28
- - composer install --no-dev
29
- # - curl -LSs https://box-project.github.io/box2/installer.php | php
30
- # - composer global require drupal/coder:~8.1
39
+ - phpenv config-rm xdebug.ini || true
40
+
41
+ # Set variables.
42
+ - |
43
+ if [[ "$TRAVIS_PHP_VERSION" == "5.5.9" ]] || [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then
44
+ export DRUPAL_BRANCH="8.6.x"
45
+ # PHP 5.5.9 on TravisCI has a Sqlite version that fails
46
+ # minimum requirements, so we install on MySql instead.
47
+ export SIMPLETEST_DB="mysql://root:@localhost/drupal_travis_db#drupalconsole"
48
+ else
49
+ export DRUPAL_BRANCH="8.8.x"
50
+ export SIMPLETEST_DB="sqlite://localhost/sites/default/files/.ht.sqlite#drupalconsole"
51
+ fi
52
+
53
+ # Get Drupal via git, and install it via Composer. Then, require
54
+ # latest drupal/console at its master branch via Composer.
55
+ - git clone --depth=50 --branch=$DRUPAL_BRANCH http://git.drupal.org/project/drupal.git $DRUPAL_PATH
56
+ - cd $DRUPAL_PATH
57
+ - composer install --no-progress --no-suggest
58
+ - composer require "drupal/console:dev-master" --no-progress --no-suggest
59
+
60
+ # Replace vendor/drupal/console with the one just being built from GitHub.
61
+ - rm -rf $DRUPAL_PATH/vendor/drupal/console
62
+ - mkdir -p $DRUPAL_PATH/vendor/drupal/console
63
+ - cp -r $TRAVIS_BUILD_DIR/* $DRUPAL_PATH/vendor/drupal/console
64
+ # Update drupal/console dependencies in case they have been changed in the
65
+ # current build.
66
+ - composer update drupal/console
31
67
32
68
script :
33
- - if [ -n "${TRAVIS_BUILD_DIR+1}" ]; then PROJECT_DIR=$TRAVIS_BUILD_DIR; fi
34
- # - phpunit
35
- # - php box.phar build
36
- # - php drupal.phar init
37
- # - php drupal.phar check
38
- # - php drupal.phar site:new drupal8.dev --latest --no-interaction
39
- # - cd drupal8.dev
40
- # - php ../drupal.phar site:install standard --langcode=en --db-type=sqlite --db-file=sites/default/files/.ht.sqlite --site-name="Drupal 8 Site Install" [email protected] --account-name=admin [email protected] --account-pass=admin --no-interaction
41
- # - php ../drupal.phar chain --file=$PROJECT_DIR/config/dist/chain/sample.yml
69
+ # Install Drupal site via drupal/console and show site status.
70
+ -
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
71
+ - drupal site:status -v
72
+ # - cd $DRUPAL_PATH/vendor/drupal/console
73
+ # - ../../phpunit/phpunit/phpunit
42
74
# - ~/.composer/vendor/bin/phpcs --warning-severity=0 --standard=~/.composer/vendor/drupal/coder/coder_sniffer/Drupal/ruleset.xml $PROJECT_DIR/drupal8.dev/modules/custom/example
43
75
44
76
notifications :
0 commit comments