-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/2771' into feature/2766
* feature/2771: markdown fix in testing docs #2771 migrate in e2e tests #2771 Setup test imports for e2e tests #2771 setup unit tests seperate from WordPress 'unit' tests #2701 cypress tests #2771 cache dirs on travis #2771 make phpunit integration tests run locally in container #2711 docker install scripts #2771 added to bin #2771 delete old docker env # Conflicts: # package-lock.json
- Loading branch information
Showing
627 changed files
with
54,456 additions
and
233 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
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 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,16 @@ | ||
#!/usr/bin/env bash | ||
docker-compose run --rm cli wp plugin activate caldera-forms | ||
docker-compose run --rm cli wp plugin activate gutenberg | ||
exit 0; | ||
# Install test form importer/Ghost Inspector runner | ||
docker-compose run --rm cli wp plugin activate ghost-runner/plugin | ||
cd wp-content/plugins/ghost-runner | ||
if [ ! -d wp-content/plugins/ghost-runner/vendor ] | ||
then | ||
composer install | ||
fi | ||
|
||
if [ -d wp-content/plugins/ghost-runner/vendor ] | ||
then | ||
composer update --no-dev | ||
fi |
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,71 @@ | ||
#!/bin/bash | ||
|
||
#Set WordPress version | ||
WP_VERSION=${1-latest} | ||
|
||
# Exit if any command fails | ||
set -e | ||
|
||
# Include useful functions | ||
. "$(dirname "$0")/includes.sh" | ||
|
||
# Check that Docker is installed | ||
if ! command_exists "docker"; then | ||
echo -e $(error_message "Docker doesn't seem to be installed. Please head on over to the Docker site to download it: $(action_format "https://www.docker.com/community-edition#/download")") | ||
exit 1 | ||
fi | ||
|
||
# Check that Docker is running | ||
if ! docker info >/dev/null 2>&1; then | ||
echo -e $(error_message "Docker isn't running. Please check that you've started your Docker app, and see it in your system tray.") | ||
exit 1 | ||
fi | ||
|
||
# Stop existing containers | ||
echo -e $(status_message "Stopping Docker containers...") | ||
docker-compose down --remove-orphans >/dev/null 2>&1 | ||
|
||
# Download image updates | ||
echo -e $(status_message "Downloading Docker image updates...") | ||
docker-compose pull --parallel | ||
|
||
# Launch the containers | ||
echo -e $(status_message "Starting Docker containers...") | ||
docker-compose up -d >/dev/null | ||
|
||
HOST_PORT=$(docker-compose port wordpress 80 | awk -F : '{printf $2}') | ||
|
||
# Wait until the docker containers are setup properely | ||
echo -en $(status_message "Attempting to connect to wordpress...") | ||
until $(curl -L http://localhost:$HOST_PORT -so - 2>&1 | grep -q "WordPress"); do | ||
echo -n '.' | ||
sleep 3 | ||
done | ||
echo '' | ||
|
||
# Install WordPress | ||
echo -e $(status_message "Installing WordPress...") | ||
docker-compose run --rm -u 33 cli core install --url=localhost:$HOST_PORT --title=TestSite --admin_user=admin --admin_password=password [email protected] >/dev/null | ||
# Check for WordPress updates, just in case the WordPress image isn't up to date. | ||
docker-compose run --rm -u 33 cli core update >/dev/null | ||
|
||
# If the 'wordpress' volume wasn't during the down/up earlier, but the post port has changed, we need to update it. | ||
CURRENT_URL=$(docker-compose run -T --rm cli option get siteurl) | ||
if [ "$CURRENT_URL" != "http://localhost:$HOST_PORT" ]; then | ||
docker-compose run --rm cli option update home "http://localhost:$HOST_PORT" >/dev/null | ||
docker-compose run --rm cli option update siteurl "http://localhost:$HOST_PORT" >/dev/null | ||
fi | ||
echo -e $(status_message "Server is running at:") | ||
echo -e $(status_message "http://localhost:$HOST_PORT") | ||
|
||
# Install Composer | ||
echo -e $(status_message "Installing and updating Composer modules...") | ||
docker-compose run --rm composer install | ||
|
||
# Install the PHPUnit test scaffolding | ||
echo -e $(status_message "Installing PHPUnit test scaffolding...") | ||
docker-compose run --rm wordpress_phpunit /app/bin/install-wp-tests.sh wordpress_test root example mysql "${WP_VERSION}" false >/dev/null | ||
echo -e $(status_message "Completed installing tests") | ||
|
||
|
||
|
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,3 @@ | ||
#!/usr/bin/env bash | ||
docker-compose run --rm cli wp cf import-test-forms | ||
docker-compose run --rm cli wp cf create-test-pages |
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
Oops, something went wrong.