Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drush 12 #73

Merged
merged 13 commits into from
Jan 17, 2024
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ 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'
PHP_VERSION: '8.0'
- RUN: 5
DRUPAL_TESTING_DRUPAL_VERSION: '~10.0'
PHP_VERSION: '8.1'
- RUN: 6
PHP_VERSION: '8.2'

steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions configuration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)}}
Expand Down Expand Up @@ -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}}
Expand Down
3 changes: 2 additions & 1 deletion lib/stages/prepare_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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}"
Expand Down
Loading