Remote tests removed from codecoverage.

This commit is contained in:
Geoff Taylor
2021-01-22 11:37:18 -05:00
parent b8d913ee8d
commit 71d0f4454b
14 changed files with 167 additions and 189 deletions
+8 -2
View File
@@ -2,15 +2,19 @@
set -eu
declare work_dir=$(pwd)
if [ 'run' = "$1" ]; then
declare no_exit="--no-exit";
fi
cd $PROJECT_DIR
echo "Running 'codecept $@' in Docker..."
~/.composer/vendor/bin/codecept $@ --env docker $no_exit
~/.composer/vendor/bin/codecept $@ --env docker --no-redirect $no_exit
if [ 'run' = "$1" ]; then
declare test_output="/var/www/html/tests/_output";
declare test_output="tests/_output";
if [ -n "$(ls $test_output )" ]; then
echo 'Setting result files permissions'.
chmod 777 -R ${test_output}/*
@@ -25,3 +29,5 @@ if [ 'run' = "$1" ]; then
exit 0
fi
fi
cd $work_dir
+5 -9
View File
@@ -17,9 +17,11 @@ fi
# Update our domain to just be the docker container's IP address
export WORDPRESS_DOMAIN=${WORDPRESS_DOMAIN-$( hostname -i )}
export WORDPRESS_URL="http://$WORDPRESS_DOMAIN"
echo "WORDPRESS_DOMAIN=$WORDPRESS_DOMAIN" >> .env
echo "WORDPRESS_URL=$WORDPRESS_URL" >> .env
echo $WORDPRESS_URL
if [ -f $PROJECT_DIR/.env.docker ]; then
rm $PROJECT_DIR/.env.docker
fi
echo "WORDPRESS_DOMAIN=$WORDPRESS_DOMAIN" >> $PROJECT_DIR/.env.docker
echo "WORDPRESS_URL=$WORDPRESS_URL" >> $PROJECT_DIR/.env.docker
# Config WordPress
if [ -f "${WP_ROOT_FOLDER}/wp-config.php" ]; then
@@ -59,12 +61,6 @@ wp-graphql wp-graphql-jwt-authentication \
wp-graphql-woocommerce \
--allow-root
# Download c3 for testing.
if [ ! -f "$PROJECT_DIR/c3.php" ]; then
echo "Downloading Codeception's c3.php..."
curl -L 'https://raw.github.com/Codeception/c3/2.0/c3.php' > "$PROJECT_DIR/c3.php"
fi
if ! wp config has GRAPHQL_JWT_AUTH_SECRET_KEY --allow-root; then
echo "Adding WPGraphQL-JWT-Authentication salt..."
wp config set GRAPHQL_JWT_AUTH_SECRET_KEY 'test' --allow-root