-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accept param in ddev-share to avoid waiting
export BASEURL to env variable instead of writing in file remove unneeded exclude
- Loading branch information
Showing
5 changed files
with
17 additions
and
36 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
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 |
---|---|---|
|
@@ -16,13 +16,22 @@ kill-ngrok(){ | |
wp-replace "${NGROK_HOST}" "${PROJECT_HOST}" | ||
} | ||
echo "ngrok started with PID ${NGROK_PID}" | ||
|
||
echo "Waiting a few seconds for the service to come up" | ||
sleep 3 | ||
NGROK_HOST=$(ngrok-url) | ||
wp-replace "${PROJECT_HOST}" "${NGROK_HOST}" | ||
echo "export const baseUrl = 'https://${NGROK_HOST}';" > tests/e2e/Shared/base-url.js | ||
echo "Your site is now reachable at https://${NGROK_HOST}" | ||
echo "ctrl-c to stop sharing and revert database changes" | ||
trap kill-ngrok INT | ||
wait -f "${NGROK_PID}" | ||
|
||
if [ -n "$1" ] && [ "$1" = "--ci" ]; then | ||
echo "Running in CI mode" | ||
#this sets the variable for the next step | ||
export BASEURL="https://${NGROK_HOST}" | ||
echo "BASEURL=$BASEURL" >> $GITHUB_ENV | ||
else | ||
echo "Running in local mode" | ||
#this sets all variables at once, so we need to pass them all in | ||
ddev config --web-environment="BASEURL=https://${NGROK_HOST}, WP_VERSION=6.1, WP_LOCALE=en_US, WP_TITLE=Mollie WordPress Test, PLUGIN_NAME=mollie-payments-for-woocommerce, ADMIN_USER=admin, ADMIN_PASS=admin, [email protected], WC_VERSION=7.2.2" | ||
echo "ctrl-c to stop sharing and revert database changes" | ||
trap kill-ngrok INT | ||
wait -f "${NGROK_PID}" | ||
fi |
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.