Commit Graph

63 Commits

Author SHA1 Message Date
jrfnl 15994972fa GH Actions: test matrix - fix typo
There was a stray `.` in the string.
2021-07-02 17:48:31 +02:00
jrfnl 61e8701e02 GH Actions: test run - remove redundant dependency
The `xdebug` extension is already tagged as needed via the `coverage` setting, no need to add it to the `extensions` list.
---

Note: generally speaking, I personally normally don't pass an `extensions` list and allow the `setup-php` action to run with the default extensions, which is sufficient in most cases and would be sufficient here as well.

More than anything, I use the `extensions` key to _disable_ extensions for certain test runs, rather than enable them. Just something to consider.

The below documentation should give more insight.

Refs:
* https://github.com/shivammathur/setup-php/wiki/Php-extensions-loaded-on-ubuntu-18.04
* https://github.com/shivammathur/setup-php#heavy_plus_sign-php-extension-support
2021-07-02 17:46:08 +02:00
jrfnl 8a0e0d09f3 GH Actions: use predefined action to run composer install with caching
It is generally speaking a good idea to cache downloaded Composer packages between runs for performance reasons.

Now, this can be set up manually and would add two more steps to the scripts, or Ben's `composer-install` action can be used which will handle it all for you. The `composer-install` action is versatile and allows for passing additional parameters, so is perfectly suitable for this.

Ref: https://github.com/marketplace/actions/install-composer-dependencies
2021-07-02 17:41:07 +02:00
jrfnl a7c19c069b GH Actions: test run - remove "dependency version" matrix key
Running against stable/lowest dependencies is relevant when a package has runtime (non-dev) dependencies.
However, PHPMailer does not have runtime dependencies.

In other words, the `dependency-version` matrix key is redundant and unused, so we may as well remove it.
2021-07-02 17:37:19 +02:00
jrfnl bc5fe4dc1f GH Actions: CS run - remove matrix
The CS run only needs to run against one PHP version, so there is no need to set up a matrix for this.
2021-07-02 17:34:58 +02:00
Juliette 711de8bf70
GH Actions: run tests on PRs and show CS violations (#2373)
* GH Actions: run on PRs and allow for manually triggering

Currently the workflow only ran on `push` events, which - as forks have to enable the workflows - means that PRs could be submitted without CI having been run and you'd only see the CI results on merge.

By adding the `pull_request` event, it is ensured that CI is always run within the main repo for pull requests. This also allows for branch protection to be enabled with "required statuses".

Additionally, triggering a workflow for a branch manually is not supported by default in GH Actions, but has to be explicitly allowed.

This is useful if, for instance, an external action script or composer dependency has broken.
Once a fix is available, failing builds for `master` or open PRs can be retriggered manually instead of having to be re-pushed to retrigger the workflow.

Ref: https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/

* GH Actions: report CS violations in the PR

Currently the PR template asks for people to run the CS tooling.

As the PHPCS tool is also run in the test workflow and this workflow - per the previous commit - will now also be run on pull requests, we can make life easier on contributors.

The cs2pr tool allows to display the results from an action run in checkstyle format in-line in the PR code view.
This commit enables this for PHPCS, which means that the code view will now show CS violations in the PR.

Ref: https://github.com/staabm/annotate-pull-request-from-checkstyle

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-23 11:03:18 +02:00
Juliette 02eadcc95f
GH Actions: start testing against PHP 8.1 (#2363)
* GH Actions: start testing against PHP 8.1

The first alpha of PHP 8.1 has been released, so now seems like a good time to start running the tests against PHP 8.1.

For now, I've configured it to allow builds against PHP 8.1 to fail, while PHP 8.1 is still unstable.

Also: PHPUnit doesn't officially support PHP 8.1 yet, so to install PHPUnit 9.x on PHP 8.1, we need to use `--ignore-platform-reqs`, as otherwise PHPUnit 4.8 would be installed (last PHPUnit version without strict PHP version constraints).

* GH Actions: set error reporting to E_ALL

Turns out 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.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-22 18:51:01 +02:00
Marcus Bointon 34e1c900be
Charset woes 2021-02-18 14:35:27 +01:00
Marcus Bointon 60126a1b90
Back to xdebug we go... 2021-02-18 13:18:58 +01:00
Marcus Bointon 9ff9932ca7
Require pcov 2021-02-18 12:39:35 +01:00
Marcus Bointon f4910c8b0d
Only use clobber on old PHP versions 2021-02-18 12:36:19 +01:00
Marcus Bointon 19b7f3175d
Test env tweaks 2021-02-18 12:23:06 +01:00
Marcus Bointon 81319de7f1
Scrutinizer doesn't work with PHP 8 so remove it, update badges 2020-12-09 22:23:40 +01:00
Renamed from .github/workflows/ci_cd.yml (Browse further)