forked from versionpress/versionpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-tests.yml
81 lines (72 loc) · 3.08 KB
/
docker-compose-tests.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: '3.6'
services:
# !!! Containers in this file are meant to be started via `scripts/run-tests.ts`, not manually.
# For example, `links:` are not defined below and it's up to the script to start the containers properly.
# PR #1401 explains why.
wordpress-for-tests:
image: versionpress/wordpress:php7.2-apache@sha256:64b3c10adfef9ae65a140d5547d670d996c5c852b9a840c71a86a5be4f777fdc
ports:
- "80:80"
volumes:
- wordpress-files:/var/www/html:z
working_dir: /var/www/html/wptest
environment:
WORDPRESS_DB_HOST: mysql-for-tests
WORDPRESS_DB_PASSWORD: r00tpwd
mysql-for-tests:
image: mysql:5.7@sha256:1590f2540fd87e39605686873fb10206da4cbd7e83df2bc4110abe9fb740699e
ports:
- "3306:3306"
volumes:
- db-data-for-tests:/var/lib/mysql:z
environment:
MYSQL_ROOT_PASSWORD: r00tpwd
tests:
image: versionpress/wordpress:cli@sha256:86fc95921f1ac48950ab593b0b970e9a98ad3b28c0b16c5c6007ea0fac2839e9
environment:
VP_DIR: /opt/versionpress
PHP_IDE_CONFIG: serverName=VersionPress-tests
volumes:
# !!! This must be kept in sync with wordpress-cli-image/Dockerfile
- wordpress-files:/var/www/html:z
- test-logs:/var/opt/versionpress/logs:z
- ./plugins/versionpress:/opt/versionpress:ro,z
- ./ext-libs:/opt/ext-libs:ro,z
- wpcli-cache:/var/www/.wp-cli:z
working_dir: /opt/versionpress/tests
command: ../vendor/bin/phpunit --verbose --colors -c phpunit.xml --testdox-text /var/opt/versionpress/logs/testdox.txt
tests-with-wordpress:
image: versionpress/wordpress:cli@sha256:86fc95921f1ac48950ab593b0b970e9a98ad3b28c0b16c5c6007ea0fac2839e9
environment:
VP_DIR: /opt/versionpress
PHP_IDE_CONFIG: serverName=VersionPress-tests
volumes:
# !!! This must be kept in sync with wordpress-cli-image/Dockerfile
- wordpress-files:/var/www/html:z
- test-logs:/var/opt/versionpress/logs:z
- ./plugins/versionpress:/opt/versionpress:ro,z
- ./ext-libs:/opt/ext-libs:ro,z
- wpcli-cache:/var/www/.wp-cli:z
working_dir: /opt/versionpress/tests
command: ../vendor/bin/phpunit --verbose --colors -c phpunit.xml --testdox-text /var/opt/versionpress/logs/testdox.txt
wait:
image: janvoracek/docker-wait@sha256:2d91ec68cf3e0dbcd03addaded0af238944f75378f5062358bd3c5fb839b60d2
environment:
- TIMEOUT=120
# - TARGETS are specified in run-tests.ts
selenium-hub:
# Standalone Firefox is enough but could also be a full grid setup, hence the service name
image: selenium/standalone-firefox@sha256:541e4d726136b3fbf0220c1feb4d3a76c577d302e77050f1191a0d5b3a029c10
copy-files-to-host:
image: alpine@sha256:644fcb1a676b5165371437feaa922943aaf7afcfa8bfee4472f6860aad1ef2a0
volumes:
- wordpress-files:/tmp/wp
- ./dev-env/wp-for-tests:/tmp/wp-copy
- test-logs:/tmp/test-logs
- ./dev-env/test-logs:/tmp/test-logs-copy
command: '/bin/sh -c "cp -a /tmp/test-logs/. /tmp/test-logs-copy/; cp -a /tmp/wp/. /tmp/wp-copy/"'
volumes:
db-data-for-tests:
wpcli-cache:
wordpress-files:
test-logs: