Remove dependencies installation from acceptace tests

[MAILPOET-1535]
This commit is contained in:
Rostislav Wolny
2018-09-17 18:10:29 +02:00
parent 78967c8d6a
commit 079fe6f280
4 changed files with 15 additions and 20 deletions

View File

@@ -94,14 +94,9 @@ fi
sed -i "s/define( *'WP_DEBUG', false *);/define('WP_DEBUG', true);define('WP_DEBUG_DISPLAY', true);define('WP_DEBUG_LOG', true);/" ./wp-config.php
# Load Composer dependencies
# Set KEEP_DEPS environment flag to not redownload them on each run, only for the 1st time, useful for development.
# Example: docker-compose run -e KEEP_DEPS=1 codeception ...
# Don't forget to restore your original /vendor folder from /vendor_backup manually or by running acceptance tests without this flag.
if [[ -z "${KEEP_DEPS}" ]]; then
rm -rf /project/vendor_backup
fi
if [ ! -d "/project/vendor_backup" ]; then
mv /project/vendor /project/vendor_backup
# Set SKIP_DEPS environment flag to not download them. E.g. you have downloaded them yourself
# Example: docker-compose run -e SKIP_DEPS=1 codeception ...
if [[ -z "${SKIP_DEPS}" ]]; then
cd /project
php composer.phar install
fi
@@ -111,9 +106,4 @@ cd /wp-core/wp-content/plugins/mailpoet
/project/vendor/bin/codecept run acceptance -c codeception.acceptance.yml $@
exitcode=$?
if [[ -z "${KEEP_DEPS}" ]]; then
rm -rf /project/vendor
mv /project/vendor_backup /project/vendor
fi
exit $exitcode