GH Actions: run tests against PHP 8.1 and other tweaks #172
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.
This is largely the same PR as pulled in paragonie/sodium_compat#135
Commit details
GH Actions: ubuntu-16.04 is no longer supported
... use
ubuntu-18.04
orubuntu-latest
for20.04
instead.Also see:
GH Actions: explicitly set code coverage to none
As no code coverage is being recorded for these builds, it is good practice to explicitly set
coverage: none
insetup-php
.This fixes a warning on PHP 5.3 stating that Xdebug is on.
GH Actions: enable Composer caching
... by using the
ramsey/composer-install
action.This means that the Composer downloads directory for dependencies will be cached and restored on each build. This conserves resources and should also make builds faster.
Ref: https://github.com/marketplace/actions/install-composer-dependencies
GH Actions: split off Psalm to separate workflow
Psalm does not need to be run against multiple PHP versions. Running it once should be enough.
With that in mind, this commit:
CI
workflow.tools
setting forsetup-php
.GH Actions: clean up running of the tests
In contrast to Sodium Compat, the tests for this package were running on the low PHP versions.
However, the point remains that PHPUnit was being installed 3 (!) times, once via the
setup-php
action, once via thecomposer install
and once via thephp-actions/phpunit
action.This simplifies the script and ensures that the tests are always run against the most appropriate PHPUnit version for the PHP version against which the tests are being run, by:
setup-php
.php-actions/phpunit
action.I'm also removing the explicit ini settings for the jobs.
These look like they were copied over from example code, but these values don't have any effect on the test runs in these workflows, so may as well be removed.
GH Actions: merge "moderate" and "modern" jobs
As there is now effectively no difference anymore between the
moderate
andmodern
jobs, these jobs can now be merged into one.GH Actions: set error reporting to -1
The default setting for
error_reporting
used by the SetupPHP action iserror_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT
anddisplay_errors
is set toOff
.For the purposes of CI, I'd recommend running with
-1
anddisplay_errors=On
to ensure all PHP notices are shown.Ref: shivammathur/setup-php#469
GH Actions: enable testing against PHP 8.1
For now, this build is still allowed to fail.