This site is open for sponsorshipHow it works →
CI cost figures are vendor list prices verified November 2026. Actual cost depends on plan, concurrency, and discount terms. Vendor links are direct, unpaid. How we work.

Updated December 2026 · 7 min read

When to parallelise and when to serialise

COUNTER-INTUITIVE CLAIM

Parallelisation costs you money. Sometimes it also slows you down. The assumption that “more parallel = faster = better” is one of the most expensive unchecked beliefs in CI configuration.

§ 01

When parallelism wins

  • ✓Independent test suites that share no state and have no ordering dependency. Each shard runs in isolation.
  • ✓Matrix strategies across 3+ OS or language versions where you genuinely need all combinations to pass before merge.
  • ✓Long-running single-job pipelines (30+ minutes) that can be decomposed into independent sub-jobs.
  • ✓Teams where developer time cost outweighs CI cost: a 20-developer team can justify spending $2/day extra to save 10 minutes per PR.
§ 02

When serial wins

  • !Short total wall-time (under 5 minutes). Parallel job overhead (runner startup, cache restore, checkout) can exceed the parallelism benefit.
  • !Sequential dependency chains (build must complete before test, test before deploy). You cannot parallelise these regardless of cost.
  • !Cost-sensitive teams where latency does not matter: a nightly build that takes 60 min serial vs 20 min parallel costs 3x as much in the parallel version for zero benefit to developer velocity.
§ 03

Concurrency gates: the most underused optimisation

The GitHub Actions concurrency group cancels in-progress runs when a new run starts for the same group key. This single YAML change stops paying for superseded runs, which adds up on active teams where developers push several times to the same branch.

# Cancel superseded builds on the same branch

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

Variant for release branches where you never want to cancel (you always want the release build to complete):

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads/release') }}

Worked example: a 20-developer team averaging 3 force-pushes per PR, 15 PRs active at any time. Without concurrency gate: up to 45 concurrent builds on the same branches. With concurrency gate: 15 builds (one per branch). That is 30 builds cancelled, saving 30 × average build time in billed minutes per hour of active development.

§ 04

Matrix strategy cost model

A 3 OS × 3 Node versions × 2 DB variants matrix is 18 jobs. Model the real cost before enabling it.

MATRIX COST MODEL: 3 OS (LINUX, WINDOWS, MACOS) × 3 NODE × 2 DB = 18 JOBS, GITHUB-HOSTED LIST RATES

Minutes per job8 min
Total minutes per PR18 x 8 = 144 min
PRs per day20
Daily minutes2,880 min/day (960 per OS)
Linux: 960 x 22 x $0.006$127/mo
Windows: 960 x 22 x $0.010$211/mo
macOS: 960 x 22 x $0.062$1,309/mo
Monthly cost, full matrix on every PR$1,647/mo
Reduced PR matrix (1 Linux job): 8 x 20 x 22 x $0.006$21/mo

Is running all 18 matrix combinations on every PR worth $1,647/month, four-fifths of it macOS? For most teams, the answer is no. Fail-fast trims this only on runs that fail, so do not count on it for the bill. Consider running the full matrix only on main/merge-queue, and a reduced matrix (1 OS × latest Node × 1 DB) on feature branches.

§ 05

fail-fast strategy

strategy:
  fail-fast: true  # cancel remaining matrix jobs on first failure
  matrix:
    os: [ubuntu-latest, windows-latest, macos-latest]
    node: ['18', '20', '22']

Fail-fast is true by default in GitHub Actions. Explicitly disable it (fail-fast: false) only when you want to see all matrix failures simultaneously, which is useful for debugging compatibility issues but wasteful in normal operation.

Updated 2026-12-05