1) Review Job Placement
Job order can be the largest impact on workflow duration. Review the workflow for opportunities to run jobs in parallel and note which jobs are bottlenecking the workflow to review them for improvement opportunities.
Placing shorter jobs, like linters, in the beginning of the workflow is helpful in reducing the time to receive feedback about a change being tested. This saves credits and time as a large portion of the workflow doesn’t need to run to receive feedback about a small issue.
2) Identify Modular Configuration Opportunities
When reviewing workflows that fan out but never fan back in, see if the jobs could be grouped into separate workflows. Having multiple workflows provides the separation needed to take advantage of dynamic config, which allows workflows to be triggered based on parameters set in a setup workflow. Workflows and jobs can then be conditionally run, saving time and credits.
Creating parameterized jobs allows for further implementation of dynamic config and leads to an easier to manage config in most cases. Those jobs can also be used to create matrix jobs.
Next Step: High Level Improvement Opportunities
Comments
Article is closed for comments.