@@ -39,6 +39,13 @@ commands:
3939 command : |
4040 sudo pecl install mongodb-1.5.4
4141 sudo docker-php-ext-enable mongodb
42+ install-pcov-php-extension :
43+ steps :
44+ - run :
45+ name : Install pcov PHP extension
46+ command : |
47+ sudo pecl install pcov-1.0.6
48+ sudo docker-php-ext-enable pcov
4249 merge-code-coverage-reports :
4350 parameters :
4451 dir :
@@ -51,14 +58,16 @@ commands:
5158 - run :
5259 name : Download phpcov
5360 command : |
54- if [ ! -e phpcov.phar ] ; then
61+ if ! command -v phpcov; then
5562 wget https://phar.phpunit.de/phpcov.phar
63+ chmod +x phpcov.phar
64+ sudo mv phpcov.phar /usr/local/bin/phpcov
5665 fi
5766 - run :
5867 name : Merge code coverage reports
5968 command : |
6069 mkdir -p "$(dirname -- "<< parameters.out >>")"
61- phpdbg -qrr phpcov.phar merge --clover "<< parameters.out >>" "<< parameters.dir >>"
70+ phpcov merge --clover "<< parameters.out >>" "<< parameters.dir >>"
6271 merge-test-reports :
6372 parameters :
6473 dir :
@@ -263,6 +272,7 @@ jobs:
263272 steps :
264273 - checkout
265274 - install-mongodb-php-extension
275+ - install-pcov-php-extension
266276 - disable-xdebug-php-extension
267277 - disable-php-memory-limit
268278 - update-composer
@@ -276,7 +286,7 @@ jobs:
276286 mkdir -p build/logs/phpunit build/coverage
277287 split_tests=$(find tests -name '*Test.php' | circleci tests split --split-by=timings)
278288 export PARALLEL='-j10% --joblog build/logs/parallel.log --rpl {_}\ s/\\//_/g;'
279- phpunit_cmd='phpdbg -qrr vendor/bin/phpunit --coverage-php build/coverage/coverage-{_}.cov --log-junit build/logs/phpunit/{_}.xml --exclude-group mongodb,resource-hog --colors=always {}'
289+ phpunit_cmd='vendor/bin/phpunit --coverage-php build/coverage/coverage-{_}.cov --log-junit build/logs/phpunit/{_}.xml --exclude-group mongodb,resource-hog --colors=always {}'
280290 echo "$split_tests" | parallel "$phpunit_cmd" || echo "$split_tests" | parallel --retry-failed "$phpunit_cmd"
281291 - restore-npm-cache
282292 - merge-test-reports :
@@ -310,6 +320,7 @@ jobs:
310320 steps :
311321 - checkout
312322 - install-mongodb-php-extension
323+ - install-pcov-php-extension
313324 - disable-xdebug-php-extension
314325 - disable-php-memory-limit
315326 - update-composer
@@ -323,7 +334,7 @@ jobs:
323334 mkdir -p build/logs/behat build/coverage
324335 for f in $(find features -name '*.feature' -not -path 'features/main/exposed_state.feature' -not -path 'features/elasticsearch/*' -not -path 'features/mongodb/*' | circleci tests split --split-by=timings); do
325336 _f=$(echo "$f" | tr / _)
326- FEATURE="${_f}" phpdbg -qrr vendor/bin/behat --format=progress --out=std --format=junit --out=build/logs/behat/"${_f}" --profile=default-coverage --no-interaction "$f"
337+ FEATURE="${_f}" vendor/bin/behat --format=progress --out=std --format=junit --out=build/logs/behat/"${_f}" --profile=default-coverage --no-interaction "$f"
327338 done
328339 - restore-npm-cache
329340 - merge-test-reports :
@@ -355,6 +366,7 @@ jobs:
355366 steps :
356367 - checkout
357368 - install-mongodb-php-extension
369+ - install-pcov-php-extension
358370 - disable-xdebug-php-extension
359371 - disable-php-memory-limit
360372 - update-composer
@@ -367,7 +379,7 @@ jobs:
367379 name : Run PHPUnit tests
368380 command : |
369381 mkdir -p build/logs/phpunit
370- phpdbg -qrr vendor/bin/phpunit --coverage-clover build/logs/clover.xml --log-junit build/logs/phpunit/junit.xml --exclude-group resource-hog --colors=always --configuration phpunit_mongodb.xml
382+ vendor/bin/phpunit --coverage-clover build/logs/clover.xml --log-junit build/logs/phpunit/junit.xml --exclude-group resource-hog --colors=always --configuration phpunit_mongodb.xml
371383 - store_test_results :
372384 path : build/logs
373385 - store_artifacts :
@@ -392,6 +404,7 @@ jobs:
392404 steps :
393405 - checkout
394406 - install-mongodb-php-extension
407+ - install-pcov-php-extension
395408 - disable-xdebug-php-extension
396409 - disable-php-memory-limit
397410 - update-composer
@@ -404,7 +417,7 @@ jobs:
404417 name : Run Behat tests
405418 command : |
406419 mkdir -p build/logs/behat
407- phpdbg -qrr vendor/bin/behat --format=progress --out=std --format=junit --out=build/logs/behat --profile=mongodb-coverage --no-interaction
420+ vendor/bin/behat --format=progress --out=std --format=junit --out=build/logs/behat --profile=mongodb-coverage --no-interaction
408421 - restore-npm-cache
409422 - merge-test-reports :
410423 dir : build/logs/behat
@@ -435,6 +448,7 @@ jobs:
435448 steps :
436449 - checkout
437450 - install-mongodb-php-extension
451+ - install-pcov-php-extension
438452 - disable-xdebug-php-extension
439453 - disable-php-memory-limit
440454 - update-composer
@@ -447,7 +461,7 @@ jobs:
447461 name : Run Behat tests
448462 command : |
449463 mkdir -p build/logs/behat
450- phpdbg -qrr vendor/bin/behat --format=progress --out=std --format=junit --out=build/logs/behat --profile=elasticsearch-coverage --no-interaction
464+ vendor/bin/behat --format=progress --out=std --format=junit --out=build/logs/behat --profile=elasticsearch-coverage --no-interaction
451465 - restore-npm-cache
452466 - merge-test-reports :
453467 dir : build/logs/behat
0 commit comments