-
-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PCOV to TravisCI #741
Add PCOV to TravisCI #741
Conversation
Use $DRIVER instead of different env variables for each driver Enable xdebug when DRIVER=none to generate coverage Use correct env variable name to detect phpdbg in e2e tests Add default `env: DRIVER="xdebug"` and remove duplicate job Do not run pcov for phpspec e2e test Use composer install or composer update --prefer-lowest Remove mutators form PhpUnit_Depends_Order e2e test Add more tests for pcov
Shall we limit the lowest version to something more sensible? Like 8.2.4 which is the most current release now. That is totally our choice as this is our dev dependency. I went ahead and did that in #743 |
I think one way to tackle this issue is to detect whenever we're being run with |
@theofidry, @sanmai fixed your comments. New matrix |
script: | ||
- if [[ $PHPDBG != 1 ]]; then xdebug-enable; fi | ||
- if [[ $PHPDBG != 1 ]]; then $PHPUNIT_BIN; else phpdbg -qrr $PHPUNIT_BIN; fi | ||
- if [[ "$DRIVER" == "xdebug" || "$DRIVER" == "none" ]]; then xdebug-enable; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the point of DRIVER=none
is to run Infection without any kind of coverage collector, with the coverage data we had from the initial PHPUnit run, am I right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly!
Thank you @sanmai and @theofidry for the review |
$PHPDBG
,$NO_DEBUGGER
etc. there is a$DRIVER
env variable that can bexdebug
,phpdbg
,pcov
,none
. Took idea from PHPUnit's travis configTest
stage)pcov
for phpspec e2e test, it does not workcomposer install
orcomposer update --prefer-lowest
in ourE2ETest
that runs e2e tests inside PHPUnit. This fixes the issue when we run job on Travis with$DEPS="LOW"
, and Infection itself has the lowest dependencies (e.g. PHPUnit8.0.0
), but e2e test has normal^8
version wich is resolved to8.2.4
atm. Error was:PHP Fatal error: Uncaught Error: Call to undefined method SebastianBergmann\Environment\Runtime::getCurrentSettings() in /home/travis/build/infection/infection/tests/Fixtures/e2e/Save_PHPUnit_Bootstrap_File/vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php:191
PhpUnit_Depends_Order
e2e test. See explanation inside the diffCurrent testing matrix:
xdebug
phpdbg
pcov
(NEW)none
xdebug
phpdbg
xdebug
phpdbg
none
xdebug
phpdbg
phpdbg
phpdbg
I'm not sure we need
pcov
for 7.3 and lowest dependencies. All of this increases a build time a lot.