From 3440617778e30620e18a2c82c6271634756ec022 Mon Sep 17 00:00:00 2001 From: Paul Sealock Date: Fri, 12 Jul 2019 11:05:48 +1200 Subject: [PATCH 1/4] Tests setup: bring in Woo Core dependencies --- plugins/woocommerce-admin/bin/install-wp-tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/woocommerce-admin/bin/install-wp-tests.sh b/plugins/woocommerce-admin/bin/install-wp-tests.sh index a5fe310af7d..3820e6d110a 100755 --- a/plugins/woocommerce-admin/bin/install-wp-tests.sh +++ b/plugins/woocommerce-admin/bin/install-wp-tests.sh @@ -181,6 +181,8 @@ install_deps() { # As zip file does not include tests, we have to get it from git repo. git clone --depth 1 https://github.com/woocommerce/woocommerce.git cd "$WP_CORE_DIR" + # Bring in WooCommerce Core dependencies + composer install php wp-cli.phar plugin activate woocommerce if [ "$TRAVIS_PULL_REQUEST_BRANCH" != "" ]; then From 98e7c36155201f5434d17b575716733f0b32c077 Mon Sep 17 00:00:00 2001 From: Paul Sealock Date: Fri, 12 Jul 2019 11:17:07 +1200 Subject: [PATCH 2/4] ls to see if json --- plugins/woocommerce-admin/bin/install-wp-tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/woocommerce-admin/bin/install-wp-tests.sh b/plugins/woocommerce-admin/bin/install-wp-tests.sh index 3820e6d110a..d651ef4e0a1 100755 --- a/plugins/woocommerce-admin/bin/install-wp-tests.sh +++ b/plugins/woocommerce-admin/bin/install-wp-tests.sh @@ -182,6 +182,7 @@ install_deps() { git clone --depth 1 https://github.com/woocommerce/woocommerce.git cd "$WP_CORE_DIR" # Bring in WooCommerce Core dependencies + ls composer.json composer install php wp-cli.phar plugin activate woocommerce From 7de10b2d6478a590aefb7b16b39abc3650003e43 Mon Sep 17 00:00:00 2001 From: Paul Sealock Date: Fri, 12 Jul 2019 11:20:10 +1200 Subject: [PATCH 3/4] right directory --- plugins/woocommerce-admin/bin/install-wp-tests.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce-admin/bin/install-wp-tests.sh b/plugins/woocommerce-admin/bin/install-wp-tests.sh index d651ef4e0a1..9e4195ec395 100755 --- a/plugins/woocommerce-admin/bin/install-wp-tests.sh +++ b/plugins/woocommerce-admin/bin/install-wp-tests.sh @@ -180,10 +180,12 @@ install_deps() { cd "wp-content/plugins/" # As zip file does not include tests, we have to get it from git repo. git clone --depth 1 https://github.com/woocommerce/woocommerce.git - cd "$WP_CORE_DIR" + # Bring in WooCommerce Core dependencies - ls composer.json + cd "woocommerce" composer install + + cd "$WP_CORE_DIR" php wp-cli.phar plugin activate woocommerce if [ "$TRAVIS_PULL_REQUEST_BRANCH" != "" ]; then From 431ab61f3450d75f5b3a3468513247798c4c364d Mon Sep 17 00:00:00 2001 From: Jeff Stieler Date: Fri, 12 Jul 2019 11:33:25 -0600 Subject: [PATCH 4/4] Skip dev dependencies when installing WooCommerce for CI builds. --- plugins/woocommerce-admin/bin/install-wp-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce-admin/bin/install-wp-tests.sh b/plugins/woocommerce-admin/bin/install-wp-tests.sh index 9e4195ec395..e2ff3a6f2ba 100755 --- a/plugins/woocommerce-admin/bin/install-wp-tests.sh +++ b/plugins/woocommerce-admin/bin/install-wp-tests.sh @@ -183,7 +183,7 @@ install_deps() { # Bring in WooCommerce Core dependencies cd "woocommerce" - composer install + composer install --no-dev cd "$WP_CORE_DIR" php wp-cli.phar plugin activate woocommerce