This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add .env.dist
- Loading branch information
Showing
3 changed files
with
40 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
DB_NAME=wordpress | ||
DB_HOST=app_db | ||
DB_USER=wordpress | ||
DB_PASSWORD=wordpress | ||
WP_TABLE_PREFIX=wp_ | ||
WP_URL=http://localhost | ||
WP_DOMAIN=localhost | ||
[email protected] | ||
ADMIN_USERNAME=admin | ||
ADMIN_PASSWORD=password | ||
ADMIN_PATH=/wp-admin | ||
|
||
TEST_DB_NAME=wpgraphql_acf_tests | ||
TEST_DB_HOST=127.0.0.1 | ||
TEST_DB_USER=wordpress | ||
TEST_DB_PASSWORD=wordpress | ||
TEST_WP_TABLE_PREFIX=wp_ | ||
|
||
SKIP_DB_CREATE=false | ||
TEST_WP_ROOT_FOLDER=/tmp/wordpress | ||
[email protected] | ||
|
||
TESTS_DIR=tests | ||
TESTS_OUTPUT=tests/_output | ||
TESTS_DATA=tests/_data | ||
TESTS_SUPPORT=tests/_support | ||
TESTS_ENVS=tests/_envs | ||
|
||
#WPGRAPHQL_VERSION=v1.3.3 | ||
SKIP_TESTS_CLEANUP=1 | ||
SUITES=wpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Schema Linter | ||
name: Schema Artifact | ||
|
||
on: | ||
workflow_dispatch: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [[ ! -f ".env" ]]; then | ||
echo "No .env file was detected. .env.dist has been copied to .env" | ||
echo "Open the .env file and enter values to match your local environment" | ||
cp .env.dist .env | ||
fi | ||
|
||
source .env | ||
|
||
print_usage_instruction() { | ||
echo "Ensure that .env file exist in project root directory exists." | ||
echo "And run the following 'composer install-wp-tests' in the project root directory" | ||
echo "And run the following 'composer build-test' in the project root directory" | ||
exit 1 | ||
} | ||
|
||
|
@@ -142,19 +148,10 @@ install_db() { | |
configure_wordpress() { | ||
cd $WP_CORE_DIR | ||
wp config create --dbname="$DB_NAME" --dbuser="$DB_USER" --dbpass="$DB_PASS" --dbhost="$DB_HOST" --skip-check --force=true | ||
wp core install --url=wp.test --title="WPGraphQL ACF Tests" --admin_user=admin --admin_password=password [email protected] | ||
wp core install --url=wp.test --title="WPGraphQL Tests" --admin_user=admin --admin_password=password [email protected] | ||
wp rewrite structure '/%year%/%monthnum%/%postname%/' | ||
} | ||
|
||
install_acf_pro() { | ||
if [ ! -d $WP_CORE_DIR/wp-content/plugins/advanced-custom-fields-pro ]; then | ||
echo "Cloning ACF PRO" | ||
git clone https://github.com/wp-premium/advanced-custom-fields-pro.git $WP_CORE_DIR/wp-content/plugins/advanced-custom-fields-pro | ||
fi | ||
echo "Cloning ACF PRO" | ||
wp plugin activate advanced-custom-fields-pro | ||
} | ||
|
||
setup_plugin() { | ||
# Add this repo as a plugin to the repo | ||
if [ ! -d $WP_CORE_DIR/wp-content/plugins/wp-graphql-acf ]; then | ||
|
@@ -190,5 +187,4 @@ setup_plugin() { | |
install_wp | ||
install_db | ||
configure_wordpress | ||
install_acf_pro | ||
setup_plugin |