-
-
Notifications
You must be signed in to change notification settings - Fork 32
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: selectively use fail-fast
with setup-php
#240
Conversation
I've added a second commit to fix the build which was failing due to an unrelated change. |
I've seen some recent build failures due to the `setup-php` action running into a rate limit and not downloading the required version of Composer. In the case of this action, that would make the test runs worthless. The `setup-php` action runner defaults to _showing_ these type errors in the logs, but not stopping the workflow run. So, specifically for those jobs where the Composer version is important, I'm adding the `fail-fast` option to `setup-php` to fail the build if the action runner ran into any errors. Ref: https://github.com/shivammathur/setup-php#fail-fast-optional
Looks like the `composer-normalize` package has dropped support for PHP < 8.0 as of version `2.29.0`. Refs: * https://github.com/ergebnis/composer-normalize/releases/tag/2.29.0 * ergebnis/composer-normalize#998
@@ -47,6 +47,7 @@ jobs: | |||
php-version: "latest" | |||
tools: "composer:${{ matrix.composer-version }}" | |||
coverage: "none" | |||
fail-fast: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realized I implemented this incorrectly, it should be:
fail-fast: true | |
env: | |
fail-fast: true |
Fixed in an updated commit.
fa9935c
to
eecc2c0
Compare
@jrfnl Would this break any downstream use of the Our deployments stopped working ~2 weeks ago: https://github.com/wp-cli/wp-cli-bundle/actions/workflows/deployment.yml |
Absolutely not. This change only affects the CI of the Without looking into your issue, but just based on a quick glance at error shown in the screenshots you included, I have a niggly feeling your issue may have something to do with Composer 2.x vs 2.2 LTS. Composer 2.3 dropped support for PHP < 7.2 and the autoload files generated by Composer 2.3+ should still be compatible with PHP 5.6 - 7.1, but no guarantee. As Composer 2.5 and 2.5.1 came out about three weeks ago, there may be something in those which broke the autoload compatibility with PHP < 7.2 ? Composer 2.2 is a LTS release, so can be used if you need to be sure autoload files are PHP cross version compatible. |
@jrfnl Looks like you are correct! composer/composer#11245 (comment)
Thanks for being kind to my ignorance 😊 I'm still sorting through how all of these GitHub Actions are chained together... |
@danielbachhuber No worries, hope you can sort it out and get your own CI running again soon. |
@danielbachhuber FYI: I just saw that Composer 2.5.2 has been released which contains a fix for the PHP 5.6 autoloader snafu. |
Description
I've seen some recent build failures due to the
setup-php
action running into a rate limit and not downloading the required version of Composer. In the case of this action, that would make the test runs worthless.The
setup-php
action runner defaults to showing these type errors in the logs, but not stopping the workflow run.So, specifically for those jobs where the Composer version is important, I'm adding the
fail-fast
option tosetup-php
to fail the build if the action runner ran into any errors.Ref: https://github.com/shivammathur/setup-php#fail-fast-optional
Motivation and context
How has this been tested?
Types of changes
PR checklist
🆕 GH Actions: update PHP version for
composer-normalize
Looks like the
composer-normalize
package has dropped support for PHP < 8.0 as of version2.29.0
.Refs: