[TESTS] Use paratest and PHPUnit cache
This speeds up tests from 90s to 44s on my machine
This commit is contained in:
parent
857e5a9c6f
commit
e44bef6de7
|
@ -9,8 +9,8 @@ bin/console doctrine:schema:update --force || exit 1
|
||||||
yes yes | bin/console doctrine:fixtures:load || exit 1
|
yes yes | bin/console doctrine:fixtures:load || exit 1
|
||||||
|
|
||||||
if [ "$#" -eq 0 ] || [ -z "$*" ]; then
|
if [ "$#" -eq 0 ] || [ -z "$*" ]; then
|
||||||
vendor/bin/simple-phpunit -vvv --coverage-html .test_coverage_report
|
XDEBUG_MODE=coverage vendor/bin/paratest --verbose --debug --processes=32 --functional --configuration=phpunit.xml.dist
|
||||||
else
|
else
|
||||||
echo "Running with filter"
|
echo "Running with filter"
|
||||||
vendor/bin/simple-phpunit -vvv --coverage-html .test_coverage_report $*
|
XDEBUG_MODE=coverage vendor/bin/paratest --verbose --debug --processes=32 --functional --configuration=phpunit.xml.dist
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -5,12 +5,15 @@
|
||||||
backupGlobals="false"
|
backupGlobals="false"
|
||||||
colors="true"
|
colors="true"
|
||||||
bootstrap="tests/bootstrap.php"
|
bootstrap="tests/bootstrap.php"
|
||||||
cacheDirectory="var/phpunit/coverage_cache"
|
|
||||||
cacheResultFile="var/phpunit/result_cache"
|
cacheResultFile="var/phpunit/result_cache"
|
||||||
stopOnFailure="true"
|
cacheResult="true"
|
||||||
stopOnError="true"
|
processIsolation="false">
|
||||||
cacheResult="true">
|
<coverage
|
||||||
<coverage processUncoveredFiles="true">
|
cacheDirectory="var/phpunit/coverage_cache"
|
||||||
|
includeUncoveredFiles="true"
|
||||||
|
processUncoveredFiles="true"
|
||||||
|
>
|
||||||
|
<!-- pathCoverage="true" -->
|
||||||
<include>
|
<include>
|
||||||
<directory suffix=".php">src</directory>
|
<directory suffix=".php">src</directory>
|
||||||
</include>
|
</include>
|
||||||
|
@ -35,6 +38,9 @@
|
||||||
<env name="QUEUE_DRIVER" value="sync"/>
|
<env name="QUEUE_DRIVER" value="sync"/>
|
||||||
<env name="MAIL_DRIVER" value="array"/>
|
<env name="MAIL_DRIVER" value="array"/>
|
||||||
</php>
|
</php>
|
||||||
|
<report>
|
||||||
|
<html outputDirectory=".test_coverage_report"/>
|
||||||
|
</report>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Controller">
|
<testsuite name="Controller">
|
||||||
<directory suffix="Test.php">./tests/Controller</directory>
|
<directory suffix="Test.php">./tests/Controller</directory>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user