-
Notifications
You must be signed in to change notification settings - Fork 95
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
GitHub Actions CI tests are failing on PHP 7.x #1288
Comments
I tried debugging this. The first thing I did was to delete the Packages that php-actions has created in this repository, in order to force them to be rebuilt. However, that just made things worse as now the building of those packages fails, which means that tests are broken for PHP 8.0 as well, not just 7.x. Another approach I tried was to fork the example-phpunit repo and test it in this branch: https://github.com/osma/example-phpunit/tree/test But so far I haven't yet been able to replicate any of these problems outside the Skosmos repo. So for now, the tests are broken but there are no clues on how they could be fixed. |
The new problem (unable to recreate the Packages that php-build uses for caching) seems to be caused by missing permissions for GITHUB_TOKEN. The error message is This needs to be sorted out first, then we can see if the original issue (which only affects PHP 7.x) still remains. |
PR #1290 fixed the php-build issues, so now we are back at the starting point: PHP 7.x tests are failing for mysterious reasons on GitHub Actions, but tests pass on PHP 8.0. |
Downgrading to PHPUnit 8.5.23 (from 8.5.24) makes the tests work again on PHP 7.x. |
Digging deeper to identify the root cause... I've cut down the Skosmos codebase and the test suite on the issue1288-debug-ci-tests branch to a bare minimum (basically just Breadcrumb.php and BreadcrumbTest.php) along with minimal Composer dependencies, disabled the autoloader etc. None of this changed the result; tests are still failing on PHP 7.x but not 8.0; even 8.1 started passing tests since the incompatible code got removed :) But then this commit which disables the logging of coverage information by PHPUnit made the PHP 7.x tests work again. PHPUnit 8 doesn't support coverage on PHP 8.x anyway. So I strongly suspect this has to do with collecting coverage information. |
I was finally able to reproduce this locally, using PHAR archives of phpunit-8.5.23 and 8.5.24 and the PCOV extension installed. Luckily this seems to be unrelated to either php-build or the GitHub Actions CI environment. Now I need to create a minimal test case and then report this on the phpunit issue tracker. I'll leave those for another day though. |
Reported as sebastianbergmann/phpunit#4934 |
That was fast (both in PHPUnit and here in Skosmos 🏆 ) |
At which URL did you encounter the problem?
https://github.com/NatLibFi/Skosmos/runs/5493589722
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Expected for PHPUnit tests to pass, but they are all failing on PHP 7.x with this kind of error:
PHP 8.0 is not affected - tests are working fine.
I just installed Skosmos on an Ubuntu 20.04 system with PHP 7.4 and ran the tests without problems. So the problem only appears under GitHub Actions CI currently.
The text was updated successfully, but these errors were encountered: