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

A few more improvements to the README.md #13

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
49 changes: 37 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,62 @@
# ddev-core-dev
# ddev-drupal-core-dev

This is a DDEV addon for doing Drupal core development.
* [What is ddev-drupal-core-dev?](#what-is-ddev-drupal-core-dev)
* [Initial Setup](#initial-setup)
* [Install Drupal](#install-drupal)
* [PHPUnit](#phpunit)
* [Nighwatch](#nightwatch)

## What is ddev-drupal-core-dev?
This is a [DDEV](https://github.com/ddev/ddev) add-on for doing Drupal Core development.


## Initial Setup

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 🙏)

```
git clone https://git.drupalcode.org/project/drupal.git drupal
cd drupal
ddev config --project-type=drupal10
# Because `ddev-drupal-core-dev` is using SQLite the database
# container is omitted by the `--omit-containers=db` flag
ddev config --omit-containers=db --disable-settings-management
ddev start
ddev corepack enable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This really shouldn't be needed any more, if we do a ddev config --update. Also, the @simesy #23 handles this right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ddev corepack enable
ddev exec corepack enable

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as i've mentioned on discord. ddev config --omit-containers=db --disable-settings-management is the exact line used on @simesy's PR. the only overlapping line. therefore i've adjusted it here to avoid conflicts and hassle. and i think those two flags are still needed. for one to avoid the db containers plus to disable the settings management. the rest is done bei config --update

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in regards your corepack suggestion. all the quickstart commands i havent bothered. all of those are taken care of in simes PR. and that corepack line is obsolete and not necessary anymore. config --update takes care of that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that PR removes this line? OK. But at least it could be correct. There isn't a ddev corepack anywhere. All good.

ddev get justafish/ddev-drupal-core-dev
ddev restart
ddev composer install
````

## Install Drupal

# See included commands
To get an overview of the list of available tasks:

```
ddev drupal list
````

Next install a demo site, which is not intended for production:

# Install drupal
````
ddev drupal install
````
> :warning: To avoid unstaged conflicts in git, **do not** `ddev composer require drush/drush`. A subset of that kind of functionality is available with `ddev drupal list`.

# Run PHPUnit tests
ddev phpunit core/modules/sdc
To drop your database tables, for example if you're working in the context of the Drupal installer, manually delete the SQLite database file located in `sites/default/files/.sqlite`.


## PHPUnit

# Run Nightwatch tests (currently only runs on Chrome)
ddev nightwatch --tag core
```
ddev phpunit core/modules/workspaces
```


## Nightwatch Examples
## Nightwatch

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.
"secret". (Core tests using Firefox are not yet mature.)

Only core tests
```
Expand Down Expand Up @@ -71,4 +96,4 @@ ddev nightwatch --tag a11y:default --defaultTheme bartik
a11y test for a custom admin theme
```
ddev nightwatch --tag a11y:admin --adminTheme seven
```
```