11language : php
22
33php :
4- - 7.1
5- - 7.2
64 - 7.3
5+ - 7.4
76
87env :
98 global :
1211 matrix :
1312 - DRUPAL_VERSION=7
1413 - DRUPAL_VERSION=8
14+ - DRUPAL_VERSION=9
1515
1616# Enable Travis containers.
1717sudo : false
@@ -26,37 +26,36 @@ install:
2626 # @see https://github.com/jhedstrom/drupalextension/issues/413
2727 # @todo Re-enable behat drush endpoint testing.
2828 # @see https://github.com/jhedstrom/drupalextension/issues/458
29- - test ${DRUPAL_VERSION} -ne 8 || COMPOSER_MEMORY_LIMIT=-1 travis_retry composer require drush/drush:~10.0 symfony/dependency-injection:3.4.4
29+ - test ${DRUPAL_VERSION} -lt 8 || composer require --no-interaction --dev --no-update drupal/core-recommended:^${DRUPAL_VERSION} drupal/core-composer-scaffold:^${DRUPAL_VERSION} drush/drush:^10
30+ # Remove core/drush deps for Drupal 7.
31+ - test ${DRUPAL_VERSION} -ge 8 || composer remove --dev drush/drush drupal/core-recommended drupal/core-composer-scaffold
3032 - composer install
3133 # For Drupal 8, change composer.json to require symfony 3.x as conflicting
3234 # versions between the separate drupal and drupalextension vendor folders
3335 # can create conflicts.
34- # @todo Change test process to require drupalextension from the local folder
35- # to let composer handle compatibility and simulate a more common process.
36- - test ${DRUPAL_VERSION} -ne 8 || COMPOSER_MEMORY_LIMIT=-1 travis_retry composer require "symfony/browser-kit:~3.4" "symfony/dependency-injection:~3.0" "symfony/translation:^3.4"
3736 # Install drush globally.
38- - (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require drush/drush:~10.0
37+ - (test ${DRUPAL_VERSION} -lt 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require drush/drush:~10.0
3938 # Install the Behat Drush Endpoint for Drupal 7 tests.
40- - test ${DRUPAL_VERSION} -ne 7 || (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/behat-drush-endpoint && (cd drush/behat-drush-endpoint && composer install && cd -))
39+ - test ${DRUPAL_VERSION} -gt 7 || (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/behat-drush-endpoint && (cd drush/behat-drush-endpoint && composer install --no-dev && cd -))
4140 # Pin node version.
4241 # @see http://austinpray.com/ops/2015/09/20/change-travis-node-version.html
4342 - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
4443 - npm install
4544
4645before_script :
4746 # Define the module path according to the Drupal version being tested.
48- - test ${DRUPAL_VERSION} -ne 8 || export MODULE_PATH="drupal/modules"
49- - test ${DRUPAL_VERSION} -eq 8 || export MODULE_PATH="drupal/sites/all/modules" && mkdir -p ${MODULE_PATH}
47+ - test ${DRUPAL_VERSION} -lt 8 || export MODULE_PATH="drupal/modules"
48+ - test ${DRUPAL_VERSION} -ge 8 || export MODULE_PATH="drupal/sites/all/modules" && mkdir -p ${MODULE_PATH}
5049 # Set sendmail so drush doesn't throw an error during site install.
5150 - echo "sendmail_path='true'" >> `php --ini | grep "Loaded Configuration" | awk '{print $4}'`
5251 - mysql -e 'create database drupal'
5352 # Download and install Drupal so we can test API abilities.
5453 # For Drush 9, dl is deprecated so we must use composer. However, we still
5554 # cannot simply require drupal/drupal since it hardcodes it's autoloader
5655 # and we'd need to use drupal-scaffold, etc, etc.
57- - test ${DRUPAL_VERSION} -eq 8 || drush dl --quiet --yes drupal-${DRUPAL_VERSION}.x --all --drupal-project-rename=drupal
58- - test ${DRUPAL_VERSION} -ne 8 || (mkdir -p tmp && cd tmp && composer require --no-interaction drupal/drupal && cd - && rm -rf drupal && mv tmp/vendor/drupal/drupal ./drupal && cd drupal && composer install && cd - && rm -rf tmp)
59- - drush --yes --root=$PWD/drupal site-install --db-url=mysql://travis:@127.0.0.1/drupal
56+ - test ${DRUPAL_VERSION} -ge 8 || drush dl --quiet --yes drupal-${DRUPAL_VERSION}.x --all --drupal-project-rename=drupal
57+ # Install Drupal.
58+ - drush --yes --root=$PWD/drupal site-install --db-url=mysql://travis:@127.0.0.1/drupal --debug
6059 # Copy the static HTML that is used for blackbox testing in the web root.
6160 - cp -r fixtures/blackbox $PWD/drupal
6261 # Copy our test module to the correct location.
@@ -70,11 +69,11 @@ before_script:
7069 # Only revert features on Drupal 7.
7170 - test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test
7271 # Disable the page cache on Drupal 8.
73- - test \! ${DRUPAL_VERSION} -eq 8 || drush --yes pmu page_cache
72+ - test \! ${DRUPAL_VERSION} -ge 8 || drush --yes pmu page_cache
7473 # Test with big_pipe enabled for Drupal 8.
75- - test \! ${DRUPAL_VERSION} -eq 8 || drush --yes en -y big_pipe
74+ - test \! ${DRUPAL_VERSION} -ge 8 || drush --yes en -y big_pipe
7675 # Clear the cache on Drupal 6 and 7, rebuild on Drupal 8.
77- - test ${DRUPAL_VERSION} -eq 8 && drush cr || drush cc all || true
76+ - test ${DRUPAL_VERSION} -ge 8 && drush cr || drush cc all || true
7877 - drush --debug runserver :8888 > ~/debug.txt 2>&1 &
7978 - cd -
8079 - sleep 4s
0 commit comments