1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-22 15:07:44 +00:00
Files
matomo/.ddev/commands/host/matomo_init_tests
Michal Kleiner 07c25a792b DDEV project config (#22245)
* DDEV project base for Matomo
* Ensure DDEV files are not part of a release
* Add console command wrapper
* Fix typos in main readme
* Mix and match DDEV+Matomo xhprof setups
* Add README for DDEV environment
* Add warning not to use to host prod instances

---------

Co-authored-by: Ayke Halder <rr-it@users.noreply.github.com>
Co-authored-by: Marc Neudert <marc@innocraft.com>
2025-02-18 04:08:01 +13:00

38 خطوط
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
## Description: Initialize Matomo environment for testing
## Usage: matomo:init:tests
## Example: ddev matomo:init:tests
echo "Configure test environment ..."
ddev matomo:console config:set \
'database_tests.host="db"' \
'database_tests.username="db"' \
'database_tests.password="db"' \
'tests.http_host="matomo.ddev.site"' \
'tests.request_uri="/"' \
'tests.port=80'
echo "Copy UI tests config file ..."
echo "@see https://developer.matomo.org/guides/tests-ui#configuring-ui-tests"
ddev exec '\cp .ddev/initial-config/config.js tests/UI/config.js'
echo "Initialise test database: setup OmniFixture ..."
ddev matomo:console tests:setup-fixture OmniFixture
echo "Install the JavaScript dependencies for the UI tests ..."
ddev exec 'cd tests/lib/screenshot-testing && npm install'
echo "TODO: Locally install the git-lfs extension to be able to download and commit UI screenshots."
echo "@see https://github.com/git-lfs/git-lfs#installing"
echo "@see https://git-lfs.com/"
read -n 1 -s -r -p "Press any key when ready to continue ..."
echo ""
echo "[git] Pull screenshots for UI tests ..."
git lfs pull --exclude=
echo "Done: Matomo tests setup initialisation finished."
echo ""