From f1863a1a463714594f0678e919aaba0953bc0654 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 10 Sep 2023 13:50:34 +0200 Subject: 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 --- .ddev/commands/web/phpunit | 7 +++++++ .ddev/config.yaml | 12 +++--------- 2 files changed, 10 insertions(+), 9 deletions(-) create mode 100755 .ddev/commands/web/phpunit 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: -- cgit v1.2.3