-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.phpunit.yml
67 lines (64 loc) · 1.49 KB
/
docker-compose.phpunit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: "3"
services:
wordpress_phpunit:
build:
context: .
dockerfile: tools/phpunit.dockerfile
args:
VERSION_PHP: 7.2
VERSION_PHP_UNIT: 8
VERSION_WP: 6.1.1
VERSION_XDEBUG: 3.1.6
SED_OPTION: '-i'
working_dir: /app/yesticket
command: phpunit
environment:
XDEBUG_MODE: "coverage"
COMPOSER_VENDOR_DIR: /tmp/vendor
deploy:
resources:
limits:
cpus: '1'
memory: 500M
reservations:
cpus: '0.2'
memory: 200M
networks:
- testing
depends_on:
mysql_phpunit:
condition: service_healthy
volumes:
- "./:/app"
- "./config/wp-tests-config.php:/tmp/wordpress-tests-lib/wp-tests-config.php"
- "testsuite:/tmp"
# Changing the DB-Container name or env requires adaption in the phpunit.dockerfile!
mysql_phpunit:
image: "mariadb:10.9"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: "wordpress_test"
MYSQL_ROOT_PASSWORD: "test"
MYSQL_USER: "yesticket"
MYSQL_PASSWORD: "test"
deploy:
resources:
limits:
cpus: '0.2'
memory: 300M
reservations:
cpus: '0.01'
memory: 100M
networks:
- testing
healthcheck:
test: "healthcheck.sh --no-defaults || exit 1"
interval: 5s
timeout: 2s
retries: 3
start_period: 10s
volumes:
testsuite: {}
networks:
testing:
name: yesticket_testing