Skip to content
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

Use pcov => xdebug => phpdbg for phpunit code coverage #166

Merged
merged 1 commit into from
Jun 14, 2022

Commits on Jun 13, 2022

  1. Use pcov => xdebug => phpdbg for phpunit code coverage

    Right now we are only using phpdbg for phpunit code coverage. And
    it's causing some problems with latest (8.0, 8.1) php versions.
    
    Also, since phpunit 8, its code coverage tool supports pcov, that
    is the lighter and better alternative. And then, xdebug running
    in coverage mode has become way better in recent versions.
    
    So, with this patch applied, moodle-plugin-ci will look for the
    "best" code coverage alternative (pcov => xdebug => phpdbg) in
    every run.
    
    This guarantees that existing automations, not having pcov or
    xdebug available will continue fall-backing to phpdbg. But if
    any of the 2 extensions are available, we'll be using them.
    
    No matter of the above (fully automatic), it's also possible
    to configure the desired code coverage tool with 3 new options,
    in case it's needed to force any:
      - coverage-pcov
      - coverage-xdebug
      - coverage-phpdbg
    
    Added support to the '--verbose' option to be passed to phpunit
    (useful to debug options or see details about skipped tests).
    
    Includes modifications to both GHA docs and template to show the new options.
    
    And, also, changes to own CI tests to have both pcov and xdebug used
    all the time.
    stronk7 committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    a0bec99 View commit details
    Browse the repository at this point in the history