Workflow design and parallelization

  • Generally, one workflow per purpose (build and test image, lint code, deploy)
  • Jobs are isolated from each other on different runners
  • Jobs run in parallel by default, but:
  • Jobs can depend on each other to control order
  • Workflows can depend on another one finishing, or call another workflow directly
  • It’s OK to only have one job per workflow
  • ProTip: Creating a Matrix can simplify parallel testing (split up testing, or test on multiple OSes)
  • If your job has dependency services, use service containers or Docker Compose
  • Service containers are simpler. Docker Compose means you can easily reuse locally
  • Over time, optimize for speed (parallelization) and cost (less minutes). It’s a balance
  • Reusable workflows (Wednesday!) will greatly affect your workflow design
slide 30 (click 0 of 11)