aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2023-09-10 13:50:34 +0200
committerHarald Eilertsen <haraldei@anduin.net>2023-09-10 13:50:34 +0200
commitf1863a1a463714594f0678e919aaba0953bc0654 (patch)
treeeecfd51e29b5a750a8c6ad2003b26a3baa61f088
parent6c63b1fcfe593e002aacfb6093a509137999e97e (diff)
downloadhubzilla-ddev-f1863a1a463714594f0678e919aaba0953bc0654.tar.gz
hubzilla-ddev-f1863a1a463714594f0678e919aaba0953bc0654.tar.bz2
hubzilla-ddev-f1863a1a463714594f0678e919aaba0953bc0654.zip
Fix ddev config and add phpunit subcommand
+ Update config to use ./core as working dir. Hubzilla assumes it is running with it's root directory as the cwd, so this makes sure tests work correctly when invoked through ddev. + Add phpunit ddev subcommand Enables running phpunit in the container directly from the host terminal like this. $ ddev phpunit -c tests/phpunit.xml tests The paths are relative to ./core
-rwxr-xr-x.ddev/commands/web/phpunit7
-rw-r--r--.ddev/config.yaml12
2 files changed, 10 insertions, 9 deletions
diff --git a/.ddev/commands/web/phpunit b/.ddev/commands/web/phpunit
new file mode 100755
index 0000000..90451f4
--- /dev/null
+++ b/.ddev/commands/web/phpunit
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+## Description: Run phpunit in the ddev environment
+## Usage: phpunit
+## Example: ddev phpunit tests
+
+vendor/bin/phpunit "$@"
diff --git a/.ddev/config.yaml b/.ddev/config.yaml
index 2d25e44..abf1f85 100644
--- a/.ddev/config.yaml
+++ b/.ddev/config.yaml
@@ -1,22 +1,16 @@
---
name: hubzilla
type: php
-docroot: ""
+docroot: "core"
php_version: "8.1"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
-xdebug_enabled: false
-additional_hostnames: []
-additional_fqdns: []
database:
type: postgres
version: "14"
-nfs_mount_enabled: false
-mutagen_enabled: false
-use_dns_when_possible: true
-composer_version: "2"
-web_environment: []
+webimage_extra_packages: [php-gd, php-imagick]
+working_dir: { web: '/var/www/html/core' }
nodejs_version: "16"
hooks: