-
-
Notifications
You must be signed in to change notification settings - Fork 22
Fix mutation test flow for branches/tags #118
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
Fix mutation test flow for branches/tags #118
Conversation
The variable `github.base_ref` isn't set when running the flow against branches/tags, which is leading the build to fail. This creates conditional executions to make sure the build isn't accidentally broken any more. Signed-off-by: Luís Cobucci <[email protected]>
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.
LGTM 👍
Still note that this workflow will go away when using https://github.com/laminas/laminas-ci-matrix-action
@Ocramius how should we distinguish between that tool and infection when building the matrix? It seems to be using the same configuration file, which is used to create the checks (as far as I understood from https://github.com/laminas/laminas-ci-matrix-container). |
Could you rephrase this please? |
Sure. We match the configuration file of the tools to know whether or not to add them to the build: https://github.com/laminas/laminas-ci-matrix-container/blob/f6941918a63718d1c39c52062c4c61d3a1afd0f4/src/create-jobs.js#L79-L175 Infection-static-analysis-plugin uses the very same configuration file as Infection but using a different entry point to run the analysis. My question is then: how to know when to add |
Ah, you are talking about It should suffice to check if it is existing and executable in |
Yeah, that's what we use here 🤣
I don't know... I'm not sure if the matrix calculation happens before or after the dependencies installation. We'd have to pick the approach which is less error-prone... I guess the former isn't an option since infection would also be there when Anyhow, I'll open an issue on the right repo and we can continue the discussion there 👍 |
Agree, but it's our "best effort" for now.
Indeed, best way forward |
Description
The variable
github.base_ref
isn't set when running the flow against branches/tags, which is leading the build to fail.This creates conditional executions to make sure the build isn't accidentally broken any more.
Example of successful build on a branch (after this change): https://github.com/lcobucci/automatic-releases/runs/1982270612