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

GH Actions: fix the workflows #135

Merged
merged 9 commits into from
Aug 8, 2021

Commits on Aug 7, 2021

  1. Configuration menu
    Copy the full SHA
    a746856 View commit details
    Browse the repository at this point in the history
  2. 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` in `setup-php`.
    This fixes a warning on PHP 5.3 stating that Xdebug is on.
    jrfnl committed Aug 7, 2021
    Configuration menu
    Copy the full SHA
    486ff6e View commit details
    Browse the repository at this point in the history
  3. 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
    jrfnl committed Aug 7, 2021
    Configuration menu
    Copy the full SHA
    f91894f View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2021

  1. 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:
    * Introduces a separate, dedicated workflow which only installs and runs Psalm.
    * Removes the Psalm related steps from the `CI` workflow.
    * Removes Psalm from the `tools` setting for `setup-php`.
    jrfnl committed Aug 8, 2021
    Configuration menu
    Copy the full SHA
    b93e378 View commit details
    Browse the repository at this point in the history
  2. GH Actions: fix running of the tests

    While the builds currently all show "green", if you actually fold out the "PHPUnit Tests" step, you can see that the tests haven't actually been running on PHP 5.3, 5.4, 5.5, 5.6.
    
    As of PHP 7.0, they have been running, but running against a mismatched PHPUnit version as all test runs are run against PHPUnit 9.5.x, while PHPUnit 9.5 is officially only supported on PHP 7.3 and higher.
    
    Additionally, PHPUnit was being installed 3 (!) times, once via the `setup-php` action, once via the `composer install` and once via the `php-actions/phpunit` action.
    
    To ensure that the tests are always run against the most appropriate PHPUnit version for the PHP version against which the tests are being run, I propose to:
    * Remove the installing of PHPUnit via `setup-php`.
    * Remove the use of the `php-actions/phpunit` action.
    * Defer to the Composer installed PHPUnit version in all cases.
    
    I'm also removing the explicit ini settings for the "moderate" and "modern" 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.
    
    For the "low" job, however, having some ini values set prevents the tests erroring out too quickly.
    jrfnl committed Aug 8, 2021
    Configuration menu
    Copy the full SHA
    e4fd0db View commit details
    Browse the repository at this point in the history
  3. GH Actions: merge "moderate" and "modern" jobs

    As there is now effectively no difference anymore between the `moderate` and `modern` jobs, these jobs can now be merged into one.
    jrfnl committed Aug 8, 2021
    Configuration menu
    Copy the full SHA
    a9e5799 View commit details
    Browse the repository at this point in the history
  4. GH Actions: set error reporting to E_ALL

    The default setting for `error_reporting` used by the SetupPHP action is `error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT` and `display_errors` is set to `Off`.
    
    For the purposes of CI, I'd recommend running with `E_ALL` and `display_errors=On` to ensure **all** PHP notices are shown.
    
    Ref: shivammathur/setup-php#469
    jrfnl committed Aug 8, 2021
    Configuration menu
    Copy the full SHA
    1de3d75 View commit details
    Browse the repository at this point in the history
  5. GH Actions: enable testing against PHP 8.1

    For now, this build is still allowed to fail.
    jrfnl committed Aug 8, 2021
    Configuration menu
    Copy the full SHA
    26a50e2 View commit details
    Browse the repository at this point in the history
  6. GH Actions: don't fail fast on "low" PHP versions

    I'd like to suggest adding this as a temporary measure until the failing code has been fixed.
    
    The `fail-fast` setting defaults to `true` and has the effect of cancelling any and all running/waiting builds within the same workflow as soon as one build has failed.
    
    By setting this to `false`, all builds will be always be run, allowing for easier debugging of the current test failures.
    jrfnl committed Aug 8, 2021
    Configuration menu
    Copy the full SHA
    6c0a37d View commit details
    Browse the repository at this point in the history