diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f408aa7..ac327ee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,6 +34,7 @@ jobs: - RUN: 3 DRUPAL_TESTING_COMPOSER_PROJECT: 'thunder/thunder-project' DRUPAL_TESTING_DRUPAL_VERSION: '~9.4.0' + DRUPAL_TESTING_COMPOSER_PROJECT_VERSION: '3.0.12' PHP_VERSION: '7.4' - RUN: 4 DRUPAL_TESTING_DRUPAL_VERSION: '~9.4' @@ -41,6 +42,8 @@ jobs: - RUN: 5 DRUPAL_TESTING_DRUPAL_VERSION: '~10.0' PHP_VERSION: '8.1' + - RUN: 6 + PHP_VERSION: '8.2' steps: - uses: actions/checkout@v1 @@ -75,6 +78,7 @@ jobs: DRUPAL_TESTING_COMPOSER_PROJECT: ${{ matrix.DRUPAL_TESTING_COMPOSER_PROJECT }} DRUPAL_TESTING_DRUPAL_VERSION: ${{ matrix.DRUPAL_TESTING_DRUPAL_VERSION }} DRUPAL_TESTING_MIN_BUILD: ${{ matrix.DRUPAL_TESTING_MIN_BUILD }} + DRUPAL_TESTING_COMPOSER_PROJECT_VERSION: ${{ matrix.DRUPAL_TESTING_COMPOSER_PROJECT_VERSION }} test-split-upload: runs-on: ubuntu-latest diff --git a/configuration.sh b/configuration.sh index c6685a3..0684b72 100644 --- a/configuration.sh +++ b/configuration.sh @@ -11,8 +11,12 @@ DRUPAL_TESTING_VERBOSE=${DRUPAL_TESTING_VERBOSE:-false} # The composer project to use. defaults to the drupal/recommended-project. But e.g. Distribution specific projects can be used instead. DRUPAL_TESTING_COMPOSER_PROJECT=${DRUPAL_TESTING_COMPOSER_PROJECT:-"drupal/recommended-project"} +# The drupal version to test against. This can be any valid composer version string, but only drupal versions greater 8.6 +# are supported. By default, we use the most recent stable version. +DRUPAL_TESTING_DRUPAL_VERSION=${DRUPAL_TESTING_DRUPAL_VERSION:-$(git ls-remote --tags --sort=-version:refname https://github.com/drupal/core.git | grep -E -o '[0-9]+\.[0-9]\.[0-9]+$' | head -n1)} + # The version of the composer project to use. -DRUPAL_TESTING_COMPOSER_PROJECT_VERSION=${DRUPAL_TESTING_COMPOSER_PROJECT_VERSION:-"*"} +DRUPAL_TESTING_COMPOSER_PROJECT_VERSION=${DRUPAL_TESTING_COMPOSER_PROJECT_VERSION:-${DRUPAL_TESTING_DRUPAL_VERSION}} # The directory, where the project is located. On travis this is set to TRAVIS_BUILD_DIR otherwise defaults to the current directory DRUPAL_TESTING_PROJECT_BASEDIR=${DRUPAL_TESTING_PROJECT_BASEDIR:-${TRAVIS_BUILD_DIR:-$(pwd)}} @@ -77,10 +81,6 @@ DRUPAL_TESTING_TEST_DEPRECATION=${DRUPAL_TESTING_TEST_DEPRECATION:-test -f phpst # The files pattern to ignore when testing php coding styles. DRUPAL_TESTING_PHPCS_IGNORE_PATTERN=${DRUPAL_TESTING_PHPCS_IGNORE_PATTERN:-*/vendor/*,*/core/*,*/autoload.php,*.md} -# The drupal version to test against. This can be any valid composer version string, but only drupal versions greater 8.6 -# are supported. By default, we use the most recent stable version. -DRUPAL_TESTING_DRUPAL_VERSION=${DRUPAL_TESTING_DRUPAL_VERSION:-$(git ls-remote --tags --sort=-version:refname https://github.com/drupal/core.git | grep -E -o '[0-9]+\.[0-9]\.[0-9]+$' | head -n1)} - # The base directory for all generated files. Into this diretory will be drupal installed and temp files stored. # This directory gets removed after successful tests. DRUPAL_TESTING_TEST_BASE_DIRECTORY=${DRUPAL_TESTING_TEST_BASE_DIRECTORY:-/tmp/test/${DRUPAL_TESTING_PROJECT_NAME}} diff --git a/lib/stages/prepare_build.sh b/lib/stages/prepare_build.sh index fc602b5..be397e3 100644 --- a/lib/stages/prepare_build.sh +++ b/lib/stages/prepare_build.sh @@ -35,7 +35,6 @@ _stage_prepare_build() { composer require oomphinc/composer-installers-extender --no-update --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" fi - composer require drush/drush:"^11.2.0" --no-update --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" composer require phpspec/prophecy-phpunit:^2 --dev --no-update --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" # Require phpstan. @@ -67,6 +66,8 @@ _stage_prepare_build() { composer require "${dev_dependency}" --dev --no-update --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" done + composer require drush/drush --no-install --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" + # Allow required plugins composer config allow-plugins.cweagans/composer-patches true --no-plugins --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}" composer config allow-plugins.drupal/core-composer-scaffold true --no-plugins --working-dir="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}"