intermediate

Parallel jobs

Split independent checks across workers to reduce feedback time without hiding shared-state or ordering assumptions.

Parallel jobs reduce feedback time by running independent work concurrently. Good pipelines split lint, typecheck, tests, and build without hiding ordering dependencies.

					jobs:
  lint:
    runs-on: ubuntu-latest
    steps: [...]
  typecheck:
    runs-on: ubuntu-latest
    steps: [...]
  test:
    needs: []  # independent unless artifacts required
    runs-on: ubuntu-latest
				

Declare `needs` when jobs consume artifacts or must run after install. Test sharding splits one suite across workers; shared databases or ports cause flakes when parallelized naively.

On interviews: dependency graphs, artifact handoff, test sharding, queue limits, shared-state assumptions exposed by parallelism.

Common pitfalls: parallel jobs mutating the same environment; fan-out exceeding org concurrency; missing `needs` causing race on artifacts.

The trade-off is wall-clock speed versus infrastructure cost and flake risk.

Checklist:

  • Split independent work across jobs.
  • Declare job dependencies explicitly.
  • Avoid shared mutable state between workers.
  • Cap parallelism to queue and budget.