php - Disable colors in code coverage output from PHPUnit -


i want automate testing little php project of mine, works far, thing not work code coverage report.

in gitlab-ci there option test coverage parsing, accepts regex. far good, found regex @ http://jarretbyrne.com/2015/04/gitlab-ci-phpunit-test-coverage-parsing/ : ^\s*lines:\s*\d+.\d+\%

but comment says: doesn't work colors enabled. phpunit has command line switch --colors-[always|never|auto] option applies normal output.

how can turn off colors --coverage-text? can use regex?

edit:

there open issue @ https://github.com/sebastianbergmann/phpunit/issues/1771

i'm running phpunit strip colors output:

php vendor/phpunit/phpunit/phpunit --coverage-text | sed -r "s/\x1b\[([0-9]{1,2}(;[0-9]{1,2})?)?[mgk]//g"


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -