2021-02-18 22:22:56 +00:00
|
|
|
version: '3'
|
2020-12-17 13:02:10 +00:00
|
|
|
|
|
|
|
services:
|
2021-02-18 22:22:56 +00:00
|
|
|
phpunit:
|
2021-04-07 17:28:03 +00:00
|
|
|
build:
|
|
|
|
context: '.'
|
|
|
|
args:
|
|
|
|
- PHP_VERSION=${PHP_VERSION:-7}
|
|
|
|
image: wc-admin-php-${PHP_VERSION:-7}-test-suite-phpunit:1.2.2
|
2021-02-18 22:22:56 +00:00
|
|
|
volumes:
|
2021-04-07 17:28:03 +00:00
|
|
|
- 'test-suite-php-${PHP_VERSION:-7}:/tmp'
|
2021-02-18 22:22:56 +00:00
|
|
|
- '../../:/app'
|
|
|
|
environment:
|
|
|
|
- WC_CORE_DIR=/tmp/wordpress/wp-content/plugins/woocommerce
|
|
|
|
- WC_VERSION=${WC_VERSION:-4.8.0}
|
|
|
|
- WP_VERSION=${WP_VERSION:-5.4}
|
2021-04-07 17:28:03 +00:00
|
|
|
- PHP_VERSION=${PHP_VERSION:-7}
|
2021-02-18 22:22:56 +00:00
|
|
|
- DB_USER=root
|
|
|
|
- DB_PASS=password
|
|
|
|
- DB_NAME=wordpress_test
|
|
|
|
- DB_HOST=phpunit-db
|
|
|
|
depends_on:
|
|
|
|
- phpunit-db
|
2020-12-17 13:02:10 +00:00
|
|
|
|
2021-02-18 22:22:56 +00:00
|
|
|
phpunit-db:
|
2022-01-27 14:28:56 +00:00
|
|
|
image: mariadb:10.5.8
|
2021-02-18 22:22:56 +00:00
|
|
|
hostname: 'phpunit-db'
|
|
|
|
environment:
|
|
|
|
MYSQL_DATABASE: 'wordpress_test'
|
|
|
|
MYSQL_ROOT_PASSWORD: 'password'
|
|
|
|
healthcheck:
|
|
|
|
test:
|
|
|
|
[
|
|
|
|
'CMD',
|
|
|
|
'mysqladmin',
|
|
|
|
'ping',
|
|
|
|
'-h',
|
|
|
|
'localhost',
|
|
|
|
'-u',
|
|
|
|
'root',
|
|
|
|
'-ppassword',
|
|
|
|
]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
2020-12-17 13:02:10 +00:00
|
|
|
|
|
|
|
volumes:
|
2021-04-07 17:28:03 +00:00
|
|
|
test-suite-php-7: {}
|
|
|
|
test-suite-php-8: {}
|