Skip to content

Commit

Permalink
Merge pull request #54 from localgovdrupal/4.x
Browse files Browse the repository at this point in the history
4.0.0-beta2 release
  • Loading branch information
finnlewis authored May 21, 2024
2 parents ef86f36 + 87d1b5c commit e27d13f
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 13 deletions.
23 changes: 14 additions & 9 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: [
localgov-micro,
localgov-micro-1,
localgov-micro-2,
localgov-micro-3,
localgov-micro-4,
localgov-micro-5
]
additional_fqdns: []
additional_hostnames:
- localgov-micro
- localgov-micro-1
- localgov-micro-2
- localgov-micro-3
- localgov-micro-4
- localgov-micro-5
additional_fqdns:
- group-0.web
- group-1.web
- group-2.web
- group-3.web
- group-4.web
- group-5.web
database:
type: mariadb
version: "10.3"
Expand Down
54 changes: 51 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ First you need to [install Composer](https://getcomposer.org/doc/00-intro.md#ins
After that you can create the project:

```shell
composer create-project --stability alpha localgovdrupal/localgov_microsites_project MY_PROJECT --no-install
composer create-project --stability beta localgovdrupal/localgov_microsites_project:^4.0@beta MY_PROJECT --no-install
```

## Using Lando
Expand Down Expand Up @@ -72,10 +72,58 @@ lando ssh
phpunit --filter=myTestName
```


## Running PHPUnit tests in DDEV

The included phpunit.xml.dist file contains configuration for automatically
running the LocalGov Drupal test suite.

The default .ddev/config.yml includes configuration for some extra domains that
ddev and phpunit will need to resolve different microsite domains.

When ddev starts, it will attempt to write these to /etc/hosts

If DDEV cannot write to /etc/hosts, you may need to add these manually.

If you are having problems runnign phpunit tests in DDEV, try adding the
following to `/etc/hosts`

```
127.0.0.1 group-1.web group-2.web group-3.web group-4.web group-5.web
```

To allow html output, manually create a directory for browser output.

```bash
mkdir web/sites/simpletest/browser_output
```

To run all LocalGov Drupal tests from inside DDEV:

```bash
ddev ssh
phpunit
```

To run all the tests for a specific module:

```bash
ddev ssh
phpunit web/modules/contrib/localgov_my_module
```

Tests can be filtered using the `--filter` option. To only run a specific test:

```bash
ddev ssh
phpunit --filter=myTestName
```


## Maintainers

This project is currently maintained by:
This project is currently maintained by:

- Ekes: https://www.drupal.org/u/ekes
- Finn Lewis: https://www.drupal.org/u/finn-lewis
- Stephen Cox: https://www.drupal.org/u/stephen-cox
- Stephen Cox: https://www.drupal.org/u/stephen-cox
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"drupal/core-composer-scaffold": "^10.0@stable",
"drupal/core-recommended": "^10.0@stable",
"drush/drush": "^12.0",
"localgovdrupal/localgov_microsites": "^4.0@alpha"
"localgovdrupal/localgov_microsites": "^4.0@beta"
},
"require-dev": {
"brianium/paratest": "^6.3",
Expand Down

0 comments on commit e27d13f

Please sign in to comment.