In GitHub Actions, what is the difference between 'jobs' running in sequence versus in parallel?
Select an answer to reveal the explanation.
Short Explanation and Infographic
GitHub Actions is parallel by default — if you define three jobs without any dependencies, all three start at the same time. Use 'needs' to chain jobs together when job B depends on job A finishing first.
Full explanation below image
Full Explanation
In GitHub Actions workflows, jobs run in parallel by default — all jobs defined in a workflow start simultaneously unless dependencies are specified. To enforce sequential execution or define dependencies between jobs, use the 'needs' keyword. For example, 'needs: build' on a 'test' job means the test job won't start until build completes successfully. If the dependency job fails, dependent jobs are skipped by default. Matrix strategies multiply individual job configurations but each matrix combination still runs in parallel (subject to runner availability and concurrency limits). This parallel-by-default design speeds up workflows when jobs are independent.