GH Actions: actually run the tests on PHP 8.0 + 8.1 #123
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GH Actions: fail the build if a test run fails
The way things were set up now in the
phpunit
job, no matter whether tests passed or failed, the workflow would always continue.I suspect this may have been set-up this way to make sure that all variations of test runs will actually be run ?
The downside is that, while you will see a ❌ for the individual build, the workflow will not be marked as failed if a test runs fails.
I'm proposing to change this now by:
continue-on-error
for the test run.fail-fast
key and setting it tofalse
.By default this key is set to
true
, which means that if any individual build within the job fails, all other builds within the job will be cancelled.By setting it to
false
, all builds in the matrix will still be run, but if any of them fail, the workflow will be marked as "failed".Phive: upgrade used version of PHPUnit
The tests were not actually running on PHP 8.0, nor PHP 8.1, due to PHPUnit 8.4 being used, which is not compatible with PHP 8.0+.
The first compatible version in the 8.x range is 8.5 and on the 9.x. range, 9.3.
As for PHP 8.1, there is currently no guarantee yet, but your best bet is using the latest release of PHPUnit.
The
push.yml
script already contains code to downgrade the PHPUnit version used by Phive for PHP 7.2 back to PHPUnit 8, so it should be safe to upgrade the PHPUnit version for PHP 7.3 and above to PHPUnit 9.5.x.The only concession which needs to be made is for the
phpunit-with-coverage
to be run on PHP 7.3 (or to also downgrade to PHPUnit 8).PHPUnit config: fix configuration
The
tests/integration
directory does not exist and PHPUnit 9.x will fail on the configuration being invalid.