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: turn on tests against PHP 8.1 & various other tweaks #210

Merged
merged 5 commits into from
Aug 13, 2021

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Aug 8, 2021

TL;DR: these are largely the same CI changes which I made, and which have been merged, in the other repos.
As I cloned this repo now for the CS update anyway, figured I may as well bring the CI in line as well.

The build will fail until PR #209 has been merged, but should pass without issue after that.

Commit details

GH Actions: allow for manually triggering a workflow

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 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: simplify Composer caching

... by using the ramsey/composer-install action.

Ref: https://github.com/marketplace/actions/install-composer-dependencies

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:

  • Removing the continue-on-error for the test run.
  • Adding the fail-fast key and setting it to false.
    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

GH Actions: start testing against PHP 8.1

As the tests currently pass, I see no reason to allow them to fail.

@jrfnl jrfnl changed the title Gh Actions: turn on tests against PHP 8.1 & various other tweaks GH Actions: turn on tests against PHP 8.1 & various other tweaks Aug 8, 2021
@jaapio
Copy link
Member

jaapio commented Aug 8, 2021

As the tests currently pass, I see no reason to allow them to fail.

I like this, because this library is using the others you are updating :-) so we are moving forward regarding the stability of the libraries. Allowing me to focus on new features :-D

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 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/
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:
* Removing the `continue-on-error` for the test run.
* Adding the `fail-fast` key and setting it to `false`.
    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".
As the tests currently pass, I see no reason to allow them to fail.
@jrfnl jrfnl force-pushed the feature/ghactions-various-fixes branch from 028609d to 10925c5 Compare August 8, 2021 20:32
@jrfnl
Copy link
Contributor Author

jrfnl commented Aug 8, 2021

@jaapio In that case, we may as well remove the continue-on-error from the TypeResolver CI workflow as well, as IIRC the build against PHP 8.1 for that repo passes too.

@jrfnl jrfnl marked this pull request as ready for review August 8, 2021 20:37
@jaapio jaapio merged commit ab7c449 into phpDocumentor:5.x Aug 13, 2021
@jrfnl jrfnl deleted the feature/ghactions-various-fixes branch August 13, 2021 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants