Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dof-dss/nidirect-d8-mig-mods
https://github.com/dof-dss/nidirect-d8-mig-mods
drupal nidirect
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dof-dss/nidirect-d8-mig-mods
- Owner: dof-dss
- License: mit
- Created: 2019-07-25T08:15:18.000Z (over 5 years ago)
- Default Branch: development
- Last Pushed: 2021-07-05T20:34:05.000Z (over 3 years ago)
- Last Synced: 2024-11-14T21:06:16.719Z (3 months ago)
- Topics: drupal, nidirect
- Language: PHP
- Size: 960 KB
- Stars: 0
- Watchers: 7
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![CircleCI](https://circleci.com/gh/dof-dss/nidirect-d8-mig-mods.svg?style=svg)](https://circleci.com/gh/dof-dss/nidirect-d8-mig-mods)
***IF YOU UPDATE A MIGRATION CONFIGURATION PLEASE ENSURE YOU EXPORT THE CONFIG
TO THE DRUPAL/CONFIG/SYNC DIRECTORY AND COMMIT IT***# Migrations
## Running migrations
1. If you need to remove existing content on the site, use the command
`lando drush mig-purge`
2. Ensure the Drupal migrate modules (`migrate, migrate_plus, migrate_tools`)
are enabled.
3. perform a *'git pull'* to ensure you have the latest commits.
4. Enable the required NIDirect migration modules.
5. Import the NIDirect Drupal 7 database into the Lando `drupal7db` database.
6. Add the NIDirect Drupal 7 files to `/imports/files/sites/default/files/`
7. Ensure 'Migrate NIDirect Utils' is enabled and run
`lando drush mig-prep` to preform site-uuid sync and
pre-migration tasks on the D7 database.
8. Import the site configuration using 'drush cim'.
9. Use `lando mist` to display the migration status
10. Use `lando miip --group=` or `lando miip `## Migration order
Items in italics typically will not be run on production.
Run `lando miip --group=` with the following:
* migrate_drupal_7_user
* migrate_drupal_7_file
* migrate_drupal_7_taxo
* migrate_nidirect_node_driving_instructor
* migrate_nidirect_entity_gp
* migrate_nidirect_node_application
* migrate_nidirect_node_article
* migrate_nidirect_node_external_link
* migrate_nidirect_node_gp_practice
* migrate_nidirect_node_health_condition
* _migrate_nidirect_node_landing_page_
* migrate_nidirect_node_news
* _migrate_nidirect_node_contact_
* _migrate_nidirect_node_nidirect_contact_
* migrate_nidirect_node_page
* migrate_nidirect_node_publication
* migrate_drupal_7_linkthen run the following individual migrations:
* node_contact
* miip nidirect_book## Running tests
Automated testing is broken into different categories: static analysis, unit
and functional tests.### Static analysis
The project uses PHPCS to validate all custom code against
[Drupal.org coding standards](https://www.drupal.org/docs/develop/standards/coding-standards);
including migrate modules and custom themes.For convenience, it can be invoked for local development using Lando:
`lando phpcs`### Unit tests
Any custom code that implements unit tests will be checked when using PHPUnit.
For local work, invoke it with `lando phpunit`. This acts as a local tool
wrapper for the `drupal8/phpcs.sh` script in order to simplify usage.### Functional tests
Migrations and key user activities and journeys are tested using a headless
Chromedriver browser running in a local container. Drupal Core has adopted
nightwatch.js as their functional testing tool. We use the same configuration
file as Drupal Core, and can run any nightwatch.js tests
(core, contrib or custom) by specifying a test suite tags parameter, eg:`lando nightwatch --skiptags core`: run all tests except those tagged
with `core`.
`lando nightwatch --tag nidirect-migrate`: run all tests tagged
with `nidirect-migrate`.
`lando nightwatch /path/to/your/test/file.js`: run a specific set of
tests in a single file.## Environmental variables
Some tests use [environmental variables](https://en.wikipedia.org/wiki/Environment_variable)
to prevent setting potentially sensitive values directly into test code. How
these are set will vary from one environment to another, but in the case of
local development using Lando you will find them under:`/config/drupal.env`
If you need to change this file, you will also need to rebuild your local
appserver service: `lando rebuild -s appserver`## NightWatchJS tests ##
Import the included 'D7_Migrate_View' View into existing Drupal 7 NI Direct
site and update the TEST_D7_URL env var to the URL of the site.
This view contains XML data export displays for most of the migrated entities
with paths specified as /migrate/ (see 'before' hook in each test for
full path).
Each display will return a random entity but this can be overridden in the
test to return a specific node by appending an ID to the end of the URL
e.g. /migrate/recipe/5012