Skip to content

Commit

Permalink
Final config for use with DDEV v1.23.1, replaces #30, replaces #23 (#31)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
rfay and simesy authored May 23, 2024
1 parent 238c9c8 commit cd06f6c
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 25 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ We're in #ddev-for-core-dev on [Drupal Slack](https://www.drupal.org/community/c
```
git clone https://git.drupalcode.org/project/drupal.git drupal
cd drupal
ddev config --project-type=drupal10
ddev config --omit-containers=db --disable-settings-management
ddev start
ddev corepack enable
ddev get justafish/ddev-drupal-core-dev
ddev restart
ddev composer install
Expand Down
2 changes: 1 addition & 1 deletion commands/web/phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ if ! command -v phpunit >/dev/null; then
fi
echo "Clearing old webdriver sessions"
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
phpunit -c core --verbose "$@"
phpunit -c core "$@"
11 changes: 11 additions & 0 deletions config.ddev-drupal-core-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# #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'
omit_containers: ["db"]
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
3 changes: 2 additions & 1 deletion core-dev/phpunit-chrome.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
<!-- Do not limit the amount of memory tests take to run. -->
<ini name="memory_limit" value="-1"/>
<env name="SIMPLETEST_BASE_URL" value="DRUPAL_CORE_DDEV_URL"/>
<env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/>
<!-- <env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/> -->
<env name="SIMPLETEST_DB" value="sqlite://localhost/sites/default/files/db.sqlite"/>
<env name="BROWSERTEST_OUTPUT_DIRECTORY" value="/var/www/html/test_output"/>
<!-- By default, browser tests will output links that use the base URL set
in SIMPLETEST_BASE_URL. However, if your SIMPLETEST_BASE_URL is an internal
Expand Down
3 changes: 2 additions & 1 deletion core-dev/phpunit-firefox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
<!-- Do not limit the amount of memory tests take to run. -->
<ini name="memory_limit" value="-1"/>
<env name="SIMPLETEST_BASE_URL" value="DRUPAL_CORE_DDEV_URL"/>
<env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/>
<!-- <env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/> -->
<env name="SIMPLETEST_DB" value="sqlite://localhost/sites/default/files/db.sqlite"/>
<env name="BROWSERTEST_OUTPUT_DIRECTORY" value="/var/www/html/test_output"/>
<!-- By default, browser tests will output links that use the base URL set
in SIMPLETEST_BASE_URL. However, if your SIMPLETEST_BASE_URL is an internal
Expand Down
3 changes: 1 addition & 2 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: ddev-drupal-core-dev

project_files:
- web-build/Dockerfile
- config.ddev-drupal-core-dev.yaml
- docker-compose.core-dev-selenium.yaml
- core-dev/phpunit-firefox.xml
- core-dev/phpunit-chrome.xml
Expand All @@ -26,7 +26,6 @@ post_install_actions:
- cp core-dev/gitignore ../.gitignore
- mkdir -p ../test_output
- chmod +w ../test_output
- ddev exec corepack enable
- cd ../core && ddev yarn

removal_actions:
Expand Down
2 changes: 1 addition & 1 deletion tests/test.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
setup() {
set -eu -o pipefail
export DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )/.."
export TESTDIR=~/tmp/ddev-drupal-core-dev
export TESTDIR=~/tmp/test-ddev-drupal-core-dev
mkdir -p $TESTDIR
export PROJNAME=ddev-drupal-core-dev
export DDEV_NON_INTERACTIVE=true
Expand Down
17 changes: 0 additions & 17 deletions web-build/Dockerfile

This file was deleted.

0 comments on commit cd06f6c

Please sign in to comment.