mirror of
https://github.com/wp-graphql/wp-graphql-woocommerce.git
synced 2026-08-14 12:53:44 +02:00
Remote tests removed from codecoverage.
This commit is contained in:
+8
-2
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user