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

Jobs fail without coverage specification for Xdebug #372

Closed
SimonFrings opened this issue Dec 17, 2020 · 2 comments
Closed

Jobs fail without coverage specification for Xdebug #372

SimonFrings opened this issue Dec 17, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@SimonFrings
Copy link

SimonFrings commented Dec 17, 2020

We are currently switching to github actions to check our test suite.
Therefore we're using the same structure in every ci.yml, for example:

name: CI

on:
 push:
 pull_request:

jobs:
 PHPUnit:
   runs-on: ubuntu-20.04
   strategy:
     matrix:
       php:
         - 7.4
         - 7.3
         - 7.2
         - 7.1
         - 7.0
   steps:
     - uses: actions/checkout@v2
     - name: Setup PHP
       uses: shivammathur/setup-php@v2
       with:
         php-version: ${{ matrix.php }}
     - run: composer install
     - run: vendor/bin/phpunit --coverage-text
       if: ${{ matrix.php >= 7.3 }}
     - run: vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy
       if: ${{ matrix.php < 7.3 }}

As today we are facing failing jobs in all projects using the file above that were fine a day ago. (we didn't change anything)
Message:

Run vendor/bin/phpunit --coverage-text
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

Code coverage needs to be enabled in php.ini by setting 'xdebug.mode' to 'coverage'
Error: Process completed with exit code 2.

This problem occurs in different PHP versions.
If you take a look at my jobs you can see that PHP 7.1 is green with PHUnit 7.5.20 and PHP 7.3 fails with the same PHPUnit version.

Adding coverage: xdebug to our ci.yml fixes the problem.
But it cant be the solution going through every project adding this line to every ci.yml, right?

@shivammathur
Copy link
Owner

@SimonFrings Working on a fix

@shivammathur
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants