Skip to content

Commit cd06f6c

Browse files
rfaysimesy
andauthored
Final config for use with DDEV v1.23.1, replaces #30, replaces #23 (#31)
* DDEV 1.23 compatiblity, Drupal core yarn/sqlite compatibility. Docs. * Need to use sqlite now b/c no mysql. From /pull/27/files. * Remove install of sqlite3 and make dependent on DDEV v1.23.1 * Run tests now that sqlite 3.45 in DDEV release * Dockerfile is gone, don't try to install it * add back in omit_containers, can remove farther down the line * Remove --verbose from phpunit command, not supported in phpunit 10 --------- Co-authored-by: Simon Hobbs <[email protected]>
1 parent 238c9c8 commit cd06f6c

File tree

8 files changed

+19
-25
lines changed

8 files changed

+19
-25
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ We're in #ddev-for-core-dev on [Drupal Slack](https://www.drupal.org/community/c
77
```
88
git clone https://git.drupalcode.org/project/drupal.git drupal
99
cd drupal
10-
ddev config --project-type=drupal10
10+
ddev config --omit-containers=db --disable-settings-management
1111
ddev start
12-
ddev corepack enable
1312
ddev get justafish/ddev-drupal-core-dev
1413
ddev restart
1514
ddev composer install

commands/web/phpunit

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ if ! command -v phpunit >/dev/null; then
1111
fi
1212
echo "Clearing old webdriver sessions"
1313
curl -f -s http://chrome:4444/status | jq -r '.value.nodes[].slots[].session.sessionId' | while read -r session; do if [ "$session" != "null" ]; then curl -X DELETE "http://chrome:4444/session/$session"; fi; done
14-
phpunit -c core --verbose "$@"
14+
phpunit -c core "$@"

config.ddev-drupal-core-dev.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# #ddev-generated
2+
# This file is placed by the justafish/ddev-drupal-core-dev addon.
3+
4+
webimage_extra_packages: ["chromium-driver"]
5+
ddev_version_constraint: '>=v1.23.1'
6+
omit_containers: ["db"]
7+
upload_dirs:
8+
# The install technique tries to remove all of sites/default/files
9+
# but with DDEV + mutagen that isn't possible.
10+
# so just redirect the upload_dirs.
11+
- .ddev/tmp

core-dev/phpunit-chrome.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
<!-- Do not limit the amount of memory tests take to run. -->
2424
<ini name="memory_limit" value="-1"/>
2525
<env name="SIMPLETEST_BASE_URL" value="DRUPAL_CORE_DDEV_URL"/>
26-
<env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/>
26+
<!-- <env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/> -->
27+
<env name="SIMPLETEST_DB" value="sqlite://localhost/sites/default/files/db.sqlite"/>
2728
<env name="BROWSERTEST_OUTPUT_DIRECTORY" value="/var/www/html/test_output"/>
2829
<!-- By default, browser tests will output links that use the base URL set
2930
in SIMPLETEST_BASE_URL. However, if your SIMPLETEST_BASE_URL is an internal

core-dev/phpunit-firefox.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
<!-- Do not limit the amount of memory tests take to run. -->
2424
<ini name="memory_limit" value="-1"/>
2525
<env name="SIMPLETEST_BASE_URL" value="DRUPAL_CORE_DDEV_URL"/>
26-
<env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/>
26+
<!-- <env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/> -->
27+
<env name="SIMPLETEST_DB" value="sqlite://localhost/sites/default/files/db.sqlite"/>
2728
<env name="BROWSERTEST_OUTPUT_DIRECTORY" value="/var/www/html/test_output"/>
2829
<!-- By default, browser tests will output links that use the base URL set
2930
in SIMPLETEST_BASE_URL. However, if your SIMPLETEST_BASE_URL is an internal

install.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
name: ddev-drupal-core-dev
44

55
project_files:
6-
- web-build/Dockerfile
6+
- config.ddev-drupal-core-dev.yaml
77
- docker-compose.core-dev-selenium.yaml
88
- core-dev/phpunit-firefox.xml
99
- core-dev/phpunit-chrome.xml
@@ -26,7 +26,6 @@ post_install_actions:
2626
- cp core-dev/gitignore ../.gitignore
2727
- mkdir -p ../test_output
2828
- chmod +w ../test_output
29-
- ddev exec corepack enable
3029
- cd ../core && ddev yarn
3130

3231
removal_actions:

tests/test.bats

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
setup() {
22
set -eu -o pipefail
33
export DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )/.."
4-
export TESTDIR=~/tmp/ddev-drupal-core-dev
4+
export TESTDIR=~/tmp/test-ddev-drupal-core-dev
55
mkdir -p $TESTDIR
66
export PROJNAME=ddev-drupal-core-dev
77
export DDEV_NON_INTERACTIVE=true

web-build/Dockerfile

-17
This file was deleted.

0 commit comments

Comments
 (0)