Optimize GitHub Actions
Currently, all test workflows are triggered automatically on every commit, including expensive and long-running jobs like E2E and accessibility tests. Moreover, whenever a PR becomes outdated, developers need to merge master into their PR branch to sync it. This triggers a full re-run of all test workflows, even for minor or unrelated changes.
Proposed Solution:
Always run on every commit (pull_request):
- Component Tests / lint
- Build Developer Guide / Dev docs
- Component Tests / component-testing
- Pull Request Checker / check-pr
- security/snyk
Run manually (workflow_dispatch or tools like slash-command-dispatch):
- Accessibility Tests / axe-testing
- E2E Tests / E2E-testing (stable & unstable)
- E2E Sql Tests / E2E-sql-testing (stable & unstable)
hey @DhiraPT can i work on this issue
Hi @madhav2348, yes feel free to work on this issue and tag me after you are done!
Hey @DhiraPT, I just finished up.
Before I submit the PR, I have a quick suggestion: Instead of relying on manual testing using workflow_dispatch or other tools, how about we simply make every PR wait for the maintainer's approval for specific tests?
Does that sound like a better approach? or I stick with the proposed one?
Sorry @madhav2348, do you mean using GitHub’s workflow run approval (i.e. the maintainer clicks Approve and run before tests start), or approval through a regular PR review?
Yes,GitHub run approval where maintainers clicks and approve for the workflow. its more convenient and effective for each PR Or we can stick with the proposed solution!
@madhav2348 Hmm, actually we can try your solution. I think it's simpler. So, we'll block merging until the workflow has successfully passed.
Hey @DhiraPT , for approve for workflow feature we just have to enable " Require approval for all external contributors " in Setting -> Actions -> General , There will be no need for to update any workflow This will ensure a secure review process and full control on every PR and each workflow,
@madhav2348 Unfortunately, I don't have access to repository options. @damithc could you help me take a look at this issue?
@DhiraPT , I can work on your proposed solution if that didn't workout!
@DhiraPT @madhav2348 Thanks for inputs in this issue. Is the final result a reduction in automated workload and an increase in manual workload? If that is the case, wouldn't it be better to keep the status quo, especially given that we have lean periods during which the manpower available for manual work is very low?
@madhav2348 Yes, let’s proceed with my proposed solution.
@damithc I don’t think this would significantly change the manual workload. Maintainers would just need to run the longer workflows before approving a PR. The main difference is that this approach reduces unnecessary workflow runs, cutting down CI time and compute cost.
has this issue been solved yet? if not I have a solution can I have it be assigned.