-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand tests and use GitHub actions (#4)
- Loading branch information
Showing
5 changed files
with
268 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Test | ||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
test: | ||
name: Run tests | ||
runs-on: 'ubuntu-20.04' | ||
env: | ||
SCHEMA_PATH: /tmp/test-schema.json | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: | ||
- "7.2" | ||
- "7.3" | ||
- "7.4" | ||
drupal-version: | ||
- "8" | ||
- "9" | ||
drush-version: | ||
- "9" | ||
- "10" | ||
- "11" | ||
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: set skip flag | ||
id: skip | ||
if: ${{ (matrix.drupal-version == '9' && matrix.php-version == '7.2') || (matrix.drush-version == '9' && matrix.drupal-version == '9') || (matrix.drush-version == '11' && matrix.php-version == '7.3') || (matrix.drush-version == '11' && matrix.php-version == '7.2') || (matrix.drupal-version == '8' && matrix.drush-version == '11') }} | ||
run: echo "::set-output name=skip::1" | ||
|
||
- name: Install drupal | ||
if: matrix.drupal-version == '8' | ||
run: | | ||
cd .. && composer create-project drupal/recommended-project:8.9.20 test-project --no-interaction | ||
cd test-project | ||
- name: install drupal | ||
if: ${{ matrix.drupal-version == '9' && steps.skip.outputs.skip != '1' }} | ||
run: | | ||
cd .. && composer create-project drupal/recommended-project:9.4.1 test-project --no-interaction | ||
- name: install Drush | ||
if: ${{ steps.skip.outputs.skip != '1' }} | ||
run: | | ||
cd ../test-project | ||
composer require drush/drush:^${{ matrix.drush-version }} | ||
- name: run tests | ||
if: ${{ steps.skip.outputs.skip != '1' }} | ||
env: | ||
DRUPAL_VERSION: ${{ matrix.drupal-version }} | ||
run: | | ||
cd .. | ||
cd test-project | ||
composer config --no-plugins allow-plugins.composer/installers true | ||
composer config --no-plugins allow-plugins.drupal/core-composer-scaffold true | ||
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 | ||
cd ../drush-site-schema | ||
./vendor/bin/phpunit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,8 @@ install: | |
|
||
script: | ||
# Run automated tests. | ||
- cd .. && composer create-project drupal/recommended-project test-project --no-interaction | ||
- composer self-update --1 | ||
- cd .. && composer create-project drupal/recommended-project:8.8.6 test-project --no-interaction | ||
- cd test-project | ||
- composer require drush/drush | ||
- ./vendor/bin/drush si minimal --db-url="mysql://[email protected]/$DATABASE" -y | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
[ | ||
{ | ||
"type": "schema", | ||
"module": "block", | ||
"value": "8003" | ||
}, | ||
{ | ||
"type": "schema", | ||
"module": "dblog", | ||
"value": "8600" | ||
}, | ||
{ | ||
"type": "schema", | ||
"module": "dynamic_page_cache", | ||
"value": "8000" | ||
}, | ||
{ | ||
"type": "schema", | ||
"module": "field", | ||
"value": "8500" | ||
}, | ||
{ | ||
"type": "schema", | ||
"module": "filter", | ||
"value": "8000" | ||
}, | ||
{ | ||
"type": "schema", | ||
"module": "minimal", | ||
"value": "8000" | ||
}, | ||
{ | ||
"type": "schema", | ||
"module": "node", | ||
"value": "8700" | ||
}, | ||
{ | ||
"type": "schema", | ||
"module": "page_cache", | ||
"value": "8000" | ||
}, | ||
{ | ||
"type": "schema", | ||
"module": "path_alias", | ||
"value": "8000" | ||
}, | ||
{ | ||
"type": "schema", | ||
"module": "sqlite", | ||
"value": "8000" | ||
}, | ||
{ | ||
"type": "schema", | ||
"module": "system", | ||
"value": "8901" | ||
}, | ||
{ | ||
"type": "schema", | ||
"module": "text", | ||
"value": "8000" | ||
}, | ||
{ | ||
"type": "schema", | ||
"module": "update", | ||
"value": "8001" | ||
}, | ||
{ | ||
"type": "schema", | ||
"module": "user", | ||
"value": "9301" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "block_post_update_replace_node_type_condition" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "node_post_update_glossary_view_published" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "node_post_update_modify_base_field_author_override" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "node_post_update_rebuild_node_revision_routes" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_claro_dropbutton_variants" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_delete_authorize_settings" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_delete_rss_settings" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_enable_provider_database_driver" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_entity_revision_metadata_bc_cleanup" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_extra_fields_form_display" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_remove_key_value_expire_all_index" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_schema_version_int" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_service_advisory_settings" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_sort_all_config" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_uninstall_classy" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_uninstall_entity_reference_module" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_uninstall_simpletest" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "system_post_update_uninstall_stable" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "text_post_update_add_required_summary_flag_form_display" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "update_post_update_add_view_update_notifications_permission" | ||
}, | ||
{ | ||
"type": "post_update", | ||
"module": "", | ||
"value": "user_post_update_update_roles" | ||
} | ||
] |
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