Skip to content
Permalink
Browse files

Fix TravisCI testing (#4136)

* Update services.yml

* PHP 5.5.9 runs on Trusty, add PHP 7.4, drop HHVM

* 1

* 2

* 1

* 2

* 3

* 4

* 5

* 6

* 7

* 8

* 9

* 9

* 10

* 11

* 12

* 12

* 13

* 13

* 15

* 16

* 17

* 18

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Update autoload.local.php.dist
  • Loading branch information...
mondrake authored and enzolutions committed Aug 21, 2019
1 parent 03b20de commit a4ce15b5f7a9d6200440cfa056a081019f627e22
Showing with 54 additions and 22 deletions.
  1. +52 −20 .travis.yml
  2. +1 −1 autoload.local.php.dist
  3. +1 −1 autoload.php.dist
@@ -3,42 +3,74 @@ sudo: false
language: php

php:
- 5.5.9
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- hhvm
- 7.4snapshot

services:
- mysql

matrix:
include:
- php: 5.5.9
dist: trusty
fast_finish: true
allow_failures:
- php: hhvm
- php: 7.4snapshot

env:
global:
- PROJECT_DIR=/home/project
# 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
# This fixes a fail when install Drupal.
- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- composer self-update
- composer install --no-dev
# - curl -LSs https://box-project.github.io/box2/installer.php | php
# - composer global require drupal/coder:~8.1
- 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"
else
export DRUPAL_BRANCH="8.8.x"
export SIMPLETEST_DB="sqlite://localhost/sites/default/files/.ht.sqlite#drupalconsole"
fi
# Get Drupal via git, and install it via Composer. Then, require
# latest drupal/console at its master branch via Composer.
- git clone --depth=50 --branch=$DRUPAL_BRANCH http://git.drupal.org/project/drupal.git $DRUPAL_PATH
- cd $DRUPAL_PATH
- composer install --no-progress --no-suggest
- composer require "drupal/console:dev-master" --no-progress --no-suggest

# Replace vendor/drupal/console with the one just being built from GitHub.
- rm -rf $DRUPAL_PATH/vendor/drupal/console
- mkdir -p $DRUPAL_PATH/vendor/drupal/console
- cp -r $TRAVIS_BUILD_DIR/* $DRUPAL_PATH/vendor/drupal/console
# Update drupal/console dependencies in case they have been changed in the
# current build.
- composer update drupal/console

script:
- if [ -n "${TRAVIS_BUILD_DIR+1}" ]; then PROJECT_DIR=$TRAVIS_BUILD_DIR; fi
# - phpunit
# - php box.phar build
# - php drupal.phar init
# - php drupal.phar check
# - php drupal.phar site:new drupal8.dev --latest --no-interaction
# - cd drupal8.dev
# - php ../drupal.phar site:install standard --langcode=en --db-type=sqlite --db-file=sites/default/files/.ht.sqlite --site-name="Drupal 8 Site Install" --site-mail=admin@example.com --account-name=admin --account-mail=admin@example.com --account-pass=admin --no-interaction
# - php ../drupal.phar chain --file=$PROJECT_DIR/config/dist/chain/sample.yml
# Install Drupal site via drupal/console and show site status.
- drupal site:install standard $SIMPLETEST_DB --langcode=en --site-name="Drupal 8 Site Install" --site-mail=admin@example.com --account-name=admin --account-mail=admin@example.com --account-pass=admin --no-interaction
- 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:
@@ -1,3 +1,3 @@
<?php

$autoloaders = [ getcwd() . '/vendor/autoload.php' ];
$autoloaders = [ getcwd() . '/../../autoload.php' ];
@@ -1,6 +1,6 @@
<?php

$loader = require __DIR__ . '/vendor/autoload.php';
$loader = require __DIR__ . '/../../autoload.php';

$loader->setPsr4('Drupal\\Console\\Test\\', __DIR__ . '/Test');

0 comments on commit a4ce15b

Please sign in to comment.
You can’t perform that action at this time.