SoftwareTestPilot
All discussions
Carlos MendesJul 11

Can you run Cypress in parallel without Cypress Cloud?

Cloud is pricey. Team asks if we can shard purely on GitHub Actions.

cypressciparallel
Related learningExplore Academy skill paths

1 answer

Accepted solution

Carlos MendesJul 12

Cypress open-source has no built-in orchestration, but you can still parallelise by sharding specs yourself in CI.

yaml
strategy:
  fail-fast: false
  matrix:
    shard: [1, 2, 3]
steps:
  - run: npx cypress run --spec "$(node scripts/split-specs.js ${{ matrix.shard }} 3)"

Your `split-specs.js` just globs the spec files, sorts them, and returns every Nth file for the shard — round-robin by file count is fine, sorting by last known duration is better. Alternatives that need no custom code: `cypress-split` (free plugin, splits by timings automatically) or `sorry-cypress`, a self-hosted drop-in for the Cypress Cloud dashboard that gives you real load-balanced parallelisation plus a report UI. Only Cypress Cloud's paid `--parallel` flag does orchestration natively; the flag is a no-op without a record key.