Update test.yml #221
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
- push | |
- pull_request | |
jobs: | |
test: | |
name: Run tests | |
runs-on: 'ubuntu-latest' | |
env: | |
SCHEMA_PATH: /tmp | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: | |
- "7.4" | |
- "8.0" | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
- "8.4" | |
drupal-version: | |
- "9" | |
- "10" | |
- "11" | |
drush-version: | |
- "10" | |
- "11" | |
- "12" | |
- "13" | |
exclude: | |
- php-version: 8.2 | |
drupal-version: 9 | |
- php-version: 8.3 | |
drupal-version: 9 | |
- php-version: 8.4 | |
drupal-version: 9 | |
- drush-version: 10 | |
drupal-version: 10 | |
- drush-version: 10 | |
drupal-version: 11 | |
- drupal-version: 10 | |
php-version: 7.4 | |
- drupal-version: 10 | |
php-version: 8.0 | |
- drush-version: 12 | |
drupal-version: 9 | |
- drush-version: 13 | |
php-version: 7.4 | |
- drush-version: 13 | |
php-version: 8.0 | |
- drush-version: 13 | |
php-version: 8.1 | |
- php-version: 8.2 | |
drupal-version: 11 | |
- php-version: 8.1 | |
drupal-version: 11 | |
- php-version: 8.0 | |
drupal-version: 11 | |
- php-version: 7.4 | |
drupal-version: 11 | |
- php-version: 7.3 | |
drupal-version: 11 | |
- drush-version: 11 | |
drupal-version: 10 | |
steps: | |
- name: Dump matrix context | |
env: | |
MATRIX_CONTEXT: ${{ toJSON(matrix) }} | |
run: echo "$MATRIX_CONTEXT" | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: Dump composer verson | |
run: composer --version | |
- name: Validate composer.json | |
run: composer --verbose validate | |
- name: Install dependencies | |
run: composer --verbose install | |
- name: install drupal | |
if: ${{ matrix.drupal-version == '9' }} | |
run: | | |
cd .. && composer create-project --no-plugins drupal/recommended-project:9.4.1 test-project --no-interaction | |
- name: install drupal | |
if: ${{ matrix.drupal-version == '10' }} | |
run: | | |
cd .. && composer create-project --no-plugins drupal/recommended-project:10.2.12 test-project --no-interaction | |
- name: install drupal | |
if: ${{ matrix.drupal-version == '11' }} | |
run: | | |
cd .. && composer create-project --no-plugins drupal/recommended-project:11.1.0 test-project --no-interaction | |
- name: install Drush | |
run: | | |
cd ../test-project | |
composer config --no-plugins allow-plugins.drupal/core-project-message true | |
composer config --no-plugins allow-plugins.composer/installers true | |
composer config --no-plugins allow-plugins.drupal/core-composer-scaffold true | |
composer require drush/drush:^${{ matrix.drush-version }} -W | |
- name: run tests | |
env: | |
DRUPAL_VERSION: ${{ matrix.drupal-version }} | |
run: | | |
cd .. | |
cd test-project | |
composer install | |
./vendor/bin/drush si minimal --db-url=sqlite://sites/default/files/.ht.sqlite -y | |
mkdir -p drush/Commands/contrib | |
cp -r ../drush-site-schema drush/Commands/contrib/site-schema | |
./vendor/bin/drush site-schema --format=json > $SCHEMA_PATH/test-schema.json | |
# Now do another one, but this time with some modules excluded | |
chmod 777 web/sites/default/settings.php | |
echo '$settings["drush_site_schema_disabled_modules"] = ["dblog"];' >> web/sites/default/settings.php | |
./vendor/bin/drush site-schema --format=json > $SCHEMA_PATH/test-schema.json-excluded | |
cd ../drush-site-schema | |
./vendor/bin/phpunit |