-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
ci: run tasks conditionally #3159
ci: run tasks conditionally #3159
Conversation
I've verified this is functional and now ready for review. |
I don't think so. Based on my research, GitHub Actions is smart enough to detect that a "depends on" task has been skipped. Things may look different after this PR is merged to |
I've made a follow-up tweak in cc82868 to ensure we can keep our 6 jobs as required. Rather than skipping the required jobs, they now execute and instantly succeed if they're not needed for the branch. |
Verified the tweak as working in https://github.com/RetroAchievements/RAWeb/actions/runs/13081868701 and https://github.com/RetroAchievements/RAWeb/actions/runs/13081790730. |
This PR makes an adjustment to our pull request CI workflow.
The meat of the PR is here:
If something in the back-end layer is touched, PHP tasks will run.
If something in the front-end layer is touched, Node.js tasks will run.
Otherwise, tasks are marked as skipped (verifiable by clicking on the task icons in this PR):
The output of
composer types
is the only glue between Laravel and the React UI, and changes there will always be caught by this filter (requiring all Node.js tasks to pass).We should probably make a similar change to our pre-push job, but given the logic there will likely be very different to achieve the same functionality, let's push that to a subsequent PR.