The test workflow use the action php-actions/composer to install the project dependencies, specifying the PHP version that composer should use, but this action does not configure the test runner to continue using the desired PHP version. This issue can be seen in this example run, which simply added php --version before running PHPUnit:
The fix is to use the action shivammathur/setup-php@v2 to setup the proper PHP version in the test runner, replacing php-actions/composer which only ensured using the desired PHP version while installing the project dependencies.
Coverage remained the same at 100.0% when pulling 8514097ce13080a5c2140d186b036ae07ac727c3 on iambrosi:fix-php-version-workflows into c3ac15bfb976ea5d2483815dd25c2df3d7b03cd0 on andres-montanez:galactica.
The test workflow use the action
php-actions/composer
to install the project dependencies, specifying the PHP version that composer should use, but this action does not configure the test runner to continue using the desired PHP version. This issue can be seen in this example run, which simply addedphp --version
before running PHPUnit:The fix is to use the action
shivammathur/setup-php@v2
to setup the proper PHP version in the test runner, replacingphp-actions/composer
which only ensured using the desired PHP version while installing the project dependencies.