-
Hey, I have a small PHP Job as the following
If the tests failed in PHP 7.2 the workflow will not process any tests in PHP 7.3 This is an example of the issue https://github.com/linuxjuggler/laravel-mysql-test/commit/18c405d62df99a5573145b48ac1888bcd4b743f2/checks |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
This is a fail-fast behavior, if one job fails the workflow fails and all jobs are discarded. If you run tests and one fails you don’t need to run more tests, because you already know there is a problem. |
Beta Was this translation helpful? Give feedback.
-
This does not make any sense, especially that am testing the code with two different PHP version. Everywhere, it’s common for your code to work on PHP 7.2 for example and fail on 7.3 or vice-versa. The same when your code, for example, pass a test on Mac but fail on Linux, it means that your mac build has a problem not all your code. So when my code fails in 7.2, it means I have a problem when using PHP 7.2 it does not mean by default that all my code will fail no matter which version of PHP am using. Your code should be tested for all the matrixes, not just one of them!!! |
Beta Was this translation helpful? Give feedback.
-
You can turn off fail-fast behavior of your workflow see: https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast |
Beta Was this translation helpful? Give feedback.
-
It would be great if we could specify matrix configurations that should be allowed to fail. This is useful for a few cases, such as integration testing against new versions of some base framework, WIP support for certain environments, etc. It’s possible to do this by manually controlling success()/fail() checks, but it’s not as nice as being able to define this at the matrix level. Travis’ documentation for their equivalent: https://docs.travis-ci.com/user/customizing-the-build/#rows-that-are-allowed-to-fail |
Beta Was this translation helpful? Give feedback.
-
I think (as I didn’t test it yet) you can use Contexts and expression syntax for GitHub Actions for that |
Beta Was this translation helpful? Give feedback.
-
I was able to achieve this with continue-on-error: https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error Add an expression to the field which reads from matrix variables to ignore failures, for example:
|
Beta Was this translation helpful? Give feedback.
You can turn off fail-fast behavior of your workflow see: https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast