André Menrath
593d79b4c7
Some checks failed
PHP Code Checker / PHP Code Checker (pull_request) Successful in 54s
PHPUnit / PHPUnit – PHP 7.4 (pull_request) Failing after 57s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.4 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.0 (pull_request) Has been cancelled
However: Nobody owns 'ActivityPub' as a product name! I am just tired of discussing with the Wordress plugin team about how to interpret their rules.
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
version: '3'
|
|
|
|
# This files purpose is to run the PHPunit tests locally.
|
|
# Prerequisites:
|
|
# Run "composer install" to generate a composer.lock file and install PHP dev dependencies.
|
|
#
|
|
# 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/event-bridge-for-activitypub/",
|
|
# "/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-debug"]
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|