Skip to content

Commit 4ea7bdc

Browse files
committed
Added .env.ci for tests.
1 parent 1ac8b5a commit 4ea7bdc

File tree

1 file changed

+59
-0
lines changed
  • plugins/wpgraphql-logging/.docker

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
PLUGIN_SLUG=wpgraphql-logging
2+
3+
# Configure these to match your existing testing environment or the one you want to create with Docker.
4+
## Usually, these values should match the ones in the `wp-config.php` file.
5+
## If using Local by Flywheel, you can `open AdminerEvo` and find the values in the URL: `http://localhost:{DB_PORT}/?username={DB_USER}&db={DB_NAME}`
6+
## NOTE: Codeception may modify or the database during testing. If you want to preserve your local data, create a new database and use that for the `DB_NAME`.
7+
DB_NAME=wordpress
8+
DB_HOST=mysql
9+
DB_USER=root
10+
DB_PASSWORD=password
11+
DB_PORT=3306
12+
13+
# The local path to the WordPress root directory, the one containing the wp-load.php file.
14+
## This can be a relative path from the directory that contains the codeception.yml file, or an absolute path.
15+
## If you are using Local by Flywheel, you can find the path in the Local by Flywheel app under the site's settings.
16+
WORDPRESS_ROOT_DIR="/var/www/html"
17+
18+
# This table prefix used by the WordPress site, and in Acceptance tests.
19+
WORDPRESS_TABLE_PREFIX=wp_
20+
21+
# The URL and domain of the WordPress site, and in Acceptance tests.
22+
## If the port is in use, you can change it to a different port.
23+
WORDPRESS_URL=http://localhost
24+
WORDPRESS_DOMAIN=localhost
25+
WORDPRESS_ADMIN_PATH=/wp-admin
26+
27+
# The username and password of the administrator user of the WordPress site, and in Acceptance tests.
28+
WORDPRESS_ADMIN_USER=admin
29+
WORDPRESS_ADMIN_PASSWORD=password
30+
WORDPRESS_ADMIN_EMAIL=[email protected]
31+
32+
# Tests will require a MySQL database to run.
33+
# Do not use a database that contains important data!
34+
WORDPRESS_DB_HOST=${DB_HOST}
35+
WORDPRESS_DB_USER=${DB_USER}
36+
WORDPRESS_DB_PASSWORD=${DB_PASSWORD}
37+
WORDPRESS_DB_NAME=${DB_NAME}
38+
WORDPRESS_DB_PORT=${DB_PORT}
39+
40+
# WPUnit tests will use these variables instead.
41+
# By default this is the same as WordPress
42+
TEST_DB_HOST=${WORDPRESS_DB_HOST}
43+
TEST_DB_USER=${WORDPRESS_DB_USER}
44+
TEST_DB_PASSWORD=${WORDPRESS_DB_PASSWORD}
45+
TEST_DB_NAME=${WORDPRESS_DB_NAME}
46+
TEST_DB_PORT=${WORDPRESS_DB_PORT}
47+
# The Integration suite will use this table prefix for the WordPress tables.
48+
TEST_TABLE_PREFIX=test_
49+
50+
# The DSN used by Acceptance tests.
51+
TEST_DB_DSN="mysql:host=${TEST_DB_HOST};port=${TEST_DB_PORT};dbname=${TEST_DB_NAME}"
52+
53+
# The following variables are used to determine test behavior.
54+
55+
# Include 3rd party plugins (e.g. WooCommerce) in the tests.
56+
# Skips recreating the database before running the tests.
57+
SKIP_DB_CREATE=false
58+
# Skips configuring the WordPress installation
59+
SKIP_WP_SETUP=false

0 commit comments

Comments
 (0)