wordpress-activitypub-event.../docker-compose.yml
André Menrath 5f6f02cc81
All checks were successful
PHP Code Checker / PHP Code Checker (pull_request) Successful in 41s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m23s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m4s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 59s
add multiple phpunit runs with filters for each event plugin integration
2024-09-24 19:05:21 +02:00

47 lines
1.1 KiB
YAML

version: '3'
# This files purpose is to run the PHPunit tests locally.
# Install docker and docker compose and than just run:
# docker compose up
# To live debug in VSCode add this launch configuration to your .vscode/launch.json.
# It assumes that the WordPress root-dir is your workspace root.
#
# {
# "name": "Listen for PHPUnit",
# "type": "php",
# "request": "launch",
# "port": 9003,
# "pathMappings": {
# "/app/": "${workspaceRoot}/wp-content/plugins/activitypub-event-extensions/",
# "/tmp/wordpress/": "${workspaceRoot}/"
# },
# },
services:
test-db:
image: mariadb
environment:
MARIADB_DATABASE: wordpress-test
MARIADB_ROOT_PASSWORD: wordpress-test
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 2s
interval: 1s
timeout: 5s
retries: 10
test-php:
build:
context: .
dockerfile: Dockerfile
depends_on:
test-db:
condition: service_healthy
links:
- test-db
volumes:
- .:/app
command: ["composer", "run-script", "test"]
extra_hosts:
- "host.docker.internal:host-gateway"