generated from ddev/ddev-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
405 additions
and
405 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 |
---|---|---|
@@ -1,90 +1,90 @@ | ||
# ddev-core-dev | ||
|
||
This is a DDEV addon for doing Drupal core development. | ||
|
||
We're in #ddev-for-core-dev on [Drupal Slack](https://www.drupal.org/community/contributor-guide/reference-information/talk/tools/slack) (but please try and keep work and feature requests in Issues where it's visible to all 🙏) | ||
|
||
`ddev drush` is fully supported, along with using or testing MariaDB, MySQL, and PostgreSQL databases (and Sqlite3) | ||
|
||
|
||
``` | ||
git clone https://git.drupalcode.org/project/drupal.git drupal | ||
cd drupal | ||
ddev config --project-type=drupal | ||
ddev get justafish/ddev-drupal-core-dev | ||
ddev restart | ||
ddev composer install | ||
ddev config --update | ||
# Install drupal | ||
ddev drush si -y --account-pass==admin | ||
# Run PHPUnit tests | ||
ddev phpunit core/modules/sdc | ||
# Run Nightwatch tests (currently only runs on Chrome) | ||
ddev nightwatch --tag core | ||
``` | ||
|
||
## Using various database types | ||
|
||
By default, the DDEV default database type is used (MariaDB). | ||
|
||
To use another supported database type, | ||
`ddev delete -Oy` and `ddev config --database=mysql:8.0` or `ddev config --database=postgres:16` for example. | ||
|
||
To use Sqlite, | ||
``` | ||
ddev stop | ||
ddev config --disable-settings-management --omit-containers=db | ||
rm -rf web/sites/default/settings*.php web/sites/default/files | ||
ddev start | ||
ddev drupal install | ||
``` | ||
|
||
## Nightwatch Examples | ||
|
||
You can watch Nightwatch running in real time at https://drupal.ddev.site:7900 | ||
for Chrome and https://drupal.ddev.site:7901 for Firefox. The password is | ||
"secret". YMMV using Firefox as core tests don't currently run on it. | ||
|
||
Only core tests | ||
``` | ||
ddev nightwatch --tag core | ||
``` | ||
|
||
Skip running core tests | ||
``` | ||
ddev nightwatch --skiptags core | ||
``` | ||
|
||
Run a single test | ||
``` | ||
ddev nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js | ||
``` | ||
|
||
a11y tests for both the admin and default themes | ||
``` | ||
ddev nightwatch --tag a11y | ||
``` | ||
|
||
a11y tests for the admin theme only | ||
``` | ||
ddev nightwatch --tag a11y:admin | ||
``` | ||
|
||
a11y tests for the default theme only | ||
``` | ||
ddev nightwatch --tag a11y:default | ||
``` | ||
|
||
a11y test for a custom theme used as the default theme | ||
``` | ||
ddev nightwatch --tag a11y:default --defaultTheme bartik | ||
``` | ||
|
||
a11y test for a custom admin theme | ||
``` | ||
ddev nightwatch --tag a11y:admin --adminTheme seven | ||
``` | ||
# ddev-core-dev | ||
|
||
This is a DDEV addon for doing Drupal core development. | ||
|
||
We're in #ddev-for-core-dev on [Drupal Slack](https://www.drupal.org/community/contributor-guide/reference-information/talk/tools/slack) (but please try and keep work and feature requests in Issues where it's visible to all 🙏) | ||
|
||
`ddev drush` is fully supported, along with using or testing MariaDB, MySQL, and PostgreSQL databases (and Sqlite3) | ||
|
||
|
||
``` | ||
git clone https://git.drupalcode.org/project/drupal.git drupal | ||
cd drupal | ||
ddev config --project-type=drupal | ||
ddev get justafish/ddev-drupal-core-dev | ||
ddev restart | ||
ddev composer install | ||
ddev config --update | ||
# Install drupal | ||
ddev drush si -y --account-pass==admin | ||
# Run PHPUnit tests | ||
ddev phpunit core/modules/sdc | ||
# Run Nightwatch tests (currently only runs on Chrome) | ||
ddev nightwatch --tag core | ||
``` | ||
|
||
## Using various database types | ||
|
||
By default, the DDEV default database type is used (MariaDB). | ||
|
||
To use another supported database type, | ||
`ddev delete -Oy` and `ddev config --database=mysql:8.0` or `ddev config --database=postgres:16` for example. | ||
|
||
To use Sqlite, | ||
``` | ||
ddev stop | ||
ddev config --disable-settings-management --omit-containers=db | ||
rm -rf web/sites/default/settings*.php web/sites/default/files | ||
ddev start | ||
ddev drupal install | ||
``` | ||
|
||
## Nightwatch Examples | ||
|
||
You can watch Nightwatch running in real time at https://drupal.ddev.site:7900 | ||
for Chrome and https://drupal.ddev.site:7901 for Firefox. The password is | ||
"secret". YMMV using Firefox as core tests don't currently run on it. | ||
|
||
Only core tests | ||
``` | ||
ddev nightwatch --tag core | ||
``` | ||
|
||
Skip running core tests | ||
``` | ||
ddev nightwatch --skiptags core | ||
``` | ||
|
||
Run a single test | ||
``` | ||
ddev nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js | ||
``` | ||
|
||
a11y tests for both the admin and default themes | ||
``` | ||
ddev nightwatch --tag a11y | ||
``` | ||
|
||
a11y tests for the admin theme only | ||
``` | ||
ddev nightwatch --tag a11y:admin | ||
``` | ||
|
||
a11y tests for the default theme only | ||
``` | ||
ddev nightwatch --tag a11y:default | ||
``` | ||
|
||
a11y test for a custom theme used as the default theme | ||
``` | ||
ddev nightwatch --tag a11y:default --defaultTheme bartik | ||
``` | ||
|
||
a11y test for a custom admin theme | ||
``` | ||
ddev nightwatch --tag a11y:admin --adminTheme seven | ||
``` |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# #ddev-generated | ||
# This file is placed by the justafish/ddev-drupal-core-dev addon. | ||
|
||
webimage_extra_packages: ["chromium-driver"] | ||
ddev_version_constraint: '>=v1.23.1' | ||
upload_dirs: | ||
# The install technique tries to remove all of sites/default/files | ||
# but with DDEV + mutagen that isn't possible. | ||
# so just redirect the upload_dirs. | ||
- .ddev/tmp | ||
# #ddev-generated | ||
# This file is placed by the justafish/ddev-drupal-core-dev addon. | ||
|
||
webimage_extra_packages: ["chromium-driver"] | ||
ddev_version_constraint: '>=v1.23.1' | ||
upload_dirs: | ||
# The install technique tries to remove all of sites/default/files | ||
# but with DDEV + mutagen that isn't possible. | ||
# so just redirect the upload_dirs. | ||
- .ddev/tmp |
Oops, something went wrong.