-
Notifications
You must be signed in to change notification settings - Fork 7
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(CI): Make sure the "when unrelated" fake summaries work correctly #230
Conversation
Before they executed when any file outside the defined scope matched. However that means: When a PR touches PHP and JS, both the real and the fake summaries for node, eslint and phpunit got triggered. Since the fake summary is always green it meant one could merge a PR that in the end had red CI on the non-fake summary. Now the fake summaries are skipped, if any of the files still matches the pattern, instead of being executed whenever a single file did not match it. Signed-off-by: Joas Schilling <[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.
Thanks for diving into this!
Fixes #124
So, this or you want to port your logic @kesselb |
Tough question 😰 I used the GitHub action dorny/paths-filter to run phpunit only for php* changes at https://github.com/nextcloud/server/pull/39734/files. One advantage is that we only have one workflow. I find that easier to understand and maintain. The disadvantage is that the workflow itself is more complex because we have the additional job to evaluating the changed files and another check for the summary step. What do you think @skjnldsv @max-nextcloud @ChristophWurst? |
25accf4
to
8a9fa2e
Compare
… the changed files Signed-off-by: Joas Schilling <[email protected]>
8a9fa2e
to
b7e53a6
Compare
Before they executed when any file outside the defined scope matched. However that means: When a PR touches PHP and JS, both the real and the fake summaries for node, eslint and phpunit got triggered. Since the fake summary is always green it meant one could merge a PR that in the end had red CI on the non-fake summary.
Now the fake summaries are skipped, if any of the files still matches the pattern, instead of being executed whenever a single file did not match it.
How did I notice
Reason
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-excluding-paths
There was some file that didn't match, so that's why the "when unrelated" ran... that's .... problematic.
"When unrelated" should only run, when none of the matching files was touched.
Debug
Debugged this in https://github.com/nickvergessen/turbo-lamp/pulls
Possible improvements
Read the .yml file and use the
on.pull_request.paths-ignore
instead of duplicating the paths into the env. But I was unable to achieve that and this solution here works good enough for now.