Commit 1516bf54 authored by Jonathan Smith's avatar Jonathan Smith Committed by Jonathan Smith
Browse files

Issue #3049585 by jonathan1055: In Travis get test dependencies via composer

parent 2276f561
Loading
Loading
Loading
Loading
+8 −12
Changes for .travis.yml: 8 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -88,22 +88,18 @@ before_script:
  - mkdir $DRUPAL_ROOT/modules/$MODULE
  - cp -R $TRAVIS_BUILD_DIR/* $DRUPAL_ROOT/modules/$MODULE/

  # Get the latest dev versions of some of the test dependency modules.
  - travis_retry git clone --branch 8.x-1.x --depth 1 https://git.drupalcode.org/project/workbench_moderation.git modules/workbench_moderation
  - travis_retry git clone --branch 8.x-1.x --depth 1 https://git.drupalcode.org/project/workbench_moderation_actions.git modules/workbench_moderation_actions
  - |
    if [ "$RULES" == "YES" ]; then
      echo "Installing Rules and Typed Data ..."
      travis_retry git clone --branch 8.x-3.x --depth 1 https://git.drupalcode.org/project/rules.git modules/rules
      travis_retry git clone --branch 8.x-1.x --depth 1 https://git.drupalcode.org/project/typed_data.git modules/typed_data
    fi

  # Install the site dependencies via Composer.
  - travis_retry composer install

  # Install the other testing dependencies via Composer.
  # Install the testing dependencies via Composer.
  - travis_retry composer require drupal/devel:"^4 || ^5"
  - travis_retry composer require drush/drush:"^9 || ^10 || ^11"
  - # Need to get Rules dev because 3.0.0-alpha7 has deprecation warnings.
  - if [ "$RULES" == "YES" ]; then travis_retry composer require drupal/rules:"3.x-dev"; fi
  - travis_retry composer require drupal/workbench_moderation
  # Use * because only the dev version of WBMA is compatible with D9. None for D10.
  - if [ "$DRUPAL_CORE" == "9.5.x" ]; then travis_retry composer require drupal/workbench_moderation_actions:*; fi
  - travis_retry composer require commerceguys/addressing
  - travis_retry composer require drupal/commerce

  # Coder is already installed as part of composer install. We just need to set
@@ -142,7 +138,7 @@ script:
  - |
    if [ "$EXCLUDE" != "" ]; then
      echo "Running tests excluding $EXCLUDE ..."
      export FILTER="/^((?!(${EXCLUDE// /|})).)*$/i"   # use parameter expansion to substitute spaces with |
      export FILTER="/^(?!.*(${EXCLUDE// /|})).*/i"   # use parameter expansion to substitute spaces with |
      echo "FILTER=$FILTER"
      ./vendor/bin/phpunit -c ./core/phpunit.xml.dist --debug ./modules/$MODULE/ --filter "$FILTER"
    else