Remove dependencies installation from acceptace tests
[MAILPOET-1535]
This commit is contained in:
@ -102,7 +102,7 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Run acceptance tests
|
name: Run acceptance tests
|
||||||
command: |
|
command: |
|
||||||
docker-compose run codeception --steps --debug -vvv --html --xml
|
docker-compose run -e SKIP_DEPS=1 codeception --steps --debug -vvv --html --xml
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: tests/_output
|
path: tests/_output
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
@ -126,7 +126,7 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Run acceptance tests
|
name: Run acceptance tests
|
||||||
command: |
|
command: |
|
||||||
docker-compose run -e MULTISITE=1 codeception --steps --debug -vvv --html --xml
|
docker-compose run -e SKIP_DEPS=1 -e MULTISITE=1 codeception --steps --debug -vvv --html --xml
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: tests/_output
|
path: tests/_output
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
|
@ -198,3 +198,8 @@ To run tests:
|
|||||||
```sh
|
```sh
|
||||||
$ ./do test:acceptance
|
$ ./do test:acceptance
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can skip installation of composer dependencies using --skip-deps parameter.
|
||||||
|
```sh
|
||||||
|
$ ./do test:acceptance --skip-deps
|
||||||
|
```
|
||||||
|
@ -231,19 +231,19 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
return $this->_exec($command);
|
return $this->_exec($command);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAcceptance($opts=['file' => null, 'keep-deps' => false]) {
|
function testAcceptance($opts=['file' => null, 'skip-deps' => false]) {
|
||||||
return $this->_exec(
|
return $this->_exec(
|
||||||
'COMPOSE_HTTP_TIMEOUT=200 docker-compose run ' .
|
'COMPOSE_HTTP_TIMEOUT=200 docker-compose run ' .
|
||||||
($opts['keep-deps'] ? '-e KEEP_DEPS=1 ' : '') .
|
($opts['skip-deps'] ? '-e SKIP_DEPS=1 ' : '') .
|
||||||
'codeception --steps --debug -vvv ' .
|
'codeception --steps --debug -vvv ' .
|
||||||
'-f ' . ($opts['file'] ? $opts['file'] : '')
|
'-f ' . ($opts['file'] ? $opts['file'] : '')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAcceptanceMultisite($opts=['file' => null, 'keep-deps' => false]) {
|
function testAcceptanceMultisite($opts=['file' => null, 'skip-deps' => false]) {
|
||||||
return $this->_exec(
|
return $this->_exec(
|
||||||
'COMPOSE_HTTP_TIMEOUT=200 docker-compose run ' .
|
'COMPOSE_HTTP_TIMEOUT=200 docker-compose run ' .
|
||||||
($opts['keep-deps'] ? '-e KEEP_DEPS=1 ' : '') .
|
($opts['skip-deps'] ? '-e SKIP_DEPS=1 ' : '') .
|
||||||
'-e MULTISITE=1 ' .
|
'-e MULTISITE=1 ' .
|
||||||
'codeception --steps --debug -vvv' .
|
'codeception --steps --debug -vvv' .
|
||||||
'-f ' . ($opts['file'] ? $opts['file'] : '')
|
'-f ' . ($opts['file'] ? $opts['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
|
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
|
# Load Composer dependencies
|
||||||
# Set KEEP_DEPS environment flag to not redownload them on each run, only for the 1st time, useful for development.
|
# Set SKIP_DEPS environment flag to not download them. E.g. you have downloaded them yourself
|
||||||
# Example: docker-compose run -e KEEP_DEPS=1 codeception ...
|
# Example: docker-compose run -e SKIP_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 "${SKIP_DEPS}" ]]; then
|
||||||
if [[ -z "${KEEP_DEPS}" ]]; then
|
|
||||||
rm -rf /project/vendor_backup
|
|
||||||
fi
|
|
||||||
if [ ! -d "/project/vendor_backup" ]; then
|
|
||||||
mv /project/vendor /project/vendor_backup
|
|
||||||
cd /project
|
cd /project
|
||||||
php composer.phar install
|
php composer.phar install
|
||||||
fi
|
fi
|
||||||
@ -111,9 +106,4 @@ cd /wp-core/wp-content/plugins/mailpoet
|
|||||||
/project/vendor/bin/codecept run acceptance -c codeception.acceptance.yml $@
|
/project/vendor/bin/codecept run acceptance -c codeception.acceptance.yml $@
|
||||||
exitcode=$?
|
exitcode=$?
|
||||||
|
|
||||||
if [[ -z "${KEEP_DEPS}" ]]; then
|
|
||||||
rm -rf /project/vendor
|
|
||||||
mv /project/vendor_backup /project/vendor
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit $exitcode
|
exit $exitcode
|
||||||
|
Reference in New Issue
Block a user