Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Updated CI and composer to allow Drupal 10. #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ behat.yml
/package-lock.json
/node_modules
/.docksal
/.editorconfig
/.gitattributes
13 changes: 1 addition & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
language: php

php:
- 7.3
- 7.4
- 8.0
- 8.1

Expand All @@ -11,7 +9,6 @@ env:
- PATH=$PATH:/home/travis/.config/composer/vendor/bin
- TRAVIS_NODE_VERSION="4.0.0"
matrix:
- DRUPAL_VERSION=7
- DRUPAL_VERSION=9

# Enable Travis containers.
Expand All @@ -28,17 +25,13 @@ install:
# @todo Re-enable behat drush endpoint testing.
# @see https://github.com/jhedstrom/drupalextension/issues/458
- 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
# Remove core/drush deps for Drupal 7.
- test ${DRUPAL_VERSION} -ge 8 || composer remove --dev drush/drush drupal/core-recommended drupal/core-composer-scaffold
- composer install
# For Drupal 8, change composer.json to require symfony 3.x as conflicting
# versions between the separate drupal and drupalextension vendor folders
# can create conflicts.
# Install drush globally.
- (test ${DRUPAL_VERSION} -lt 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require drush/drush:~10.0
# Install the Behat Drush Endpoint for Drupal 7 tests.
- 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 -))
# Pin node version.
# Pin node version.
# @see http://austinpray.com/ops/2015/09/20/change-travis-node-version.html
- 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
- npm install
Expand Down Expand Up @@ -67,8 +60,6 @@ before_script:
# @todo Re-enable behat drush endpoint testing.
# @see https://github.com/jhedstrom/drupalextension/issues/458
# - test ${DRUPAL_VERSION} -eq 6 || test ${DRUPAL_VERSION} -eq 8 || (test ${DRUPAL_VERSION} -eq 7 && drush help behat)
# Only revert features on Drupal 7.
- test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test
# Disable the page cache on Drupal 8.
- test \! ${DRUPAL_VERSION} -ge 8 || drush --yes pmu page_cache
# Test with big_pipe enabled for Drupal 8.
Expand All @@ -84,8 +75,6 @@ script:
- npm test
- vendor/bin/behat -fprogress --strict
- vendor/bin/behat -fprogress --profile=drupal${DRUPAL_VERSION} --strict
# Do not test the Drush profile unless Drupal 7 was installed.
- test ${DRUPAL_VERSION} -ne 7 || vendor/bin/behat -fprogress --profile=drush --strict

after_failure:
- cat ~/debug.txt
31 changes: 20 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,25 @@
}
],
"prefer-stable": true,
"minimum-stability": "beta",
"require": {
"behat/behat": "~3.2",
"behat/mink": "~1.5",
"friends-of-behat/mink-extension": "^2",
"behat/mink-goutte-driver": "~1.0",
"friends-of-behat/mink-extension": "^2.7.2",
"behat/mink-goutte-driver": "~1|^2",
"behat/mink-selenium2-driver": "~1.1",
"drupal/drupal-driver": "^2.1.0",
"symfony/browser-kit": "^3.4|~4.4",
"symfony/dependency-injection": "~3.0|~4.4",
"symfony/translation": "^3.4|~4.4"
"drupal/drupal-driver": "dev-feature/drupal-10 as 2.1.0-dev",
"symfony/browser-kit": "^3.4|~4.4|^6",
"symfony/dependency-injection": "~3.0|~4.4|^6",
"symfony/translation": "^3.4|~4.4|^6",
"cweagans/composer-patches": "^1.7"
},
"require-dev": {
"composer/installers": "^1.2",
"composer/installers": "^1.2|^2",
"drupal/coder": "^8.3",
"drupal/core-composer-scaffold": "^9.1",
"drupal/core-recommended": "^9.1",
"drush/drush": "^10.5",
"drupal/core-composer-scaffold": "^9.1|^10@beta",
"drupal/core-recommended": "^9.1|^10@beta",
"drush/drush": "^10.5|^11 ",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpspec/phpspec": "^4.0 || ^6.0 || ^7.0"
},
Expand All @@ -58,6 +60,12 @@
"Drupal\\MinkExtension": "src/"
}
},
"repositories": {
"drupal/drupal-driver": {
"type": "vcs",
"url": "https://github.com/drevops/DrupalDriver"
}
},
"extra": {
"branch-alias": {
"dev-master": "5.0.x-dev"
Expand All @@ -77,7 +85,8 @@
"allow-plugins": {
"composer/installers": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"drupal/core-composer-scaffold": true
"drupal/core-composer-scaffold": true,
"cweagans/composer-patches": true
}
}
}
2 changes: 1 addition & 1 deletion features/api_background.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Feature: DrupalContext with background steps
| Node one |
| Node two |

Scenario Outline:
Scenario Outline: Testing login
Given I am not logged in

Examples:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"devDependencies": {
"gherkin-lint": "^2.12.0"
"gherkin-lint": "^3.4.2"
},
"scripts": {
"gherkin-lint": "gherkin-lint features",
Expand Down