Parallelizing Jest and Cypress.io Tests on CircleCI
Jest's --shard flag combined with CircleCI's parallelism setting splits a unit test suite across containers using CIRCLE_NODE_INDEX and CIRCLE_NODE_TOTAL. This cut Artsy.net's average unit test time from about 10 minutes to just over 2. Cypress integration tests can also be parallelized without the paid Cypress Dashboard by piping `circleci tests glob` into `circleci tests split` and passing the result to `cypress run --spec`. That change brought smoke tests down from roughly 7 minutes to 3, all with a few lines of CI config.
Related posts
- AI coding has made CI a bottleneck, so we reworked ours to keep up
Linear mediumAdept
Linear cut pull request CI wait time from over 6 minutes to about 5 and halved runner time per test, even as its test suites nearly quadrupled. The biggest wins came from faster third-party runners (34% faster jobs), switching to tsgo (73% faster typecheck), and rewriting type-aware lint rules as pure AST checks so ESLint and later Oxlint could skip TypeScript. Further gains came from trimming critical-path gating jobs with shallow, sparse and blobless checkouts, a retrying checkout action with low-speed git timeouts, filtered pnpm installs instead of caching node_modules, schema snapshots instead of replaying migrations, and batching short checks, which saved about 87,000 runner-minutes a month. Splitting large Vitest files and moving to eight shards cut the slowest shard from 5.25 to 4.33 minutes.
- Mobile Developer Experience at Slack
Slack Engineering mediumAdeptA dedicated mobile Developer Experience team grew from 3 to 8 engineers and cut CI feedback time and failure rates by targeting the pain points that surveys, NPS and metrics like time to merge showed hurt developers most. iOS test time fell from about 50 minutes to an average of 9 by moving from Xcodebuild to Bazel with disk caching and bazel-diff, so only affected targets are tested. On Android, test sharding (in-house Fuel, later Flank) cut runs from 50+ minutes to under 20, and replacing Calabash with Espresso took suites from ~350 to ~60 minutes. Further gains came from auto-suppressing flaky tests (failure rate 57% to 4%), migrating from Jenkins to Buildkite (CI stability ~87% to 95%, TTM down 41%), generating Xcode projects with Xcodegen to avoid merge conflicts, and adopting a merge queue.
- End-to-end test probes with Playwright
Zalando Engineering mediumAdeptZalando turned its end-to-end tests into production probes: a small set of Playwright scenarios covering critical customer journeys runs every 30 minutes and pages on-call when it fails. The trigger was an incident in which bad headless CMS content broke React hydration on product pages, which neither the Cypress pre-release tests (about 95% reliable after hardening) nor existing alerting caught. Playwright's auto-wait, web-first assertions, fixtures, expect.toPass retry loops and :visible pseudo-class selectors made the simplified tests resilient. The tests first ran for a few weeks in a low-priority email-only 'shadow' mode to remove flakiness, and after paging was enabled they fired only once, during a real outage. The main advice is to keep probes focused on critical journeys, write good selectors, and iterate in shadow mode before paging.
- Artsy Mobile 2025 Wrapped
Artsy Engineering mediumAdeptArtsy's React Native apps (Eigen, Folio, Palette Mobile) adopted Expo and over-the-air updates after VS App Center's retirement, and all three moved to the new architecture. Navigation was consolidated on react-navigation, cutting navigate latency from 320ms to 70ms, and push notifications were unified with Notifee. Screen TTI dropped below 100ms through minimal queries, speculative prefetching, query splitting and Cloudflare CDN caching of shared query results. Other wins include building Android only for arm64-v8a, which cut build time by 75%, a move from CircleCI to GitHub Actions, Maestro E2E tests in CI, and Rozenite debugger plugins.
- Infrastructure Observability for Changing the Spend Curve
Slack Engineering mediumAdeptSlack bent the growth curve of its webapp CI spend, which had been rising about 10% month over month, by using observability (dashboards, metrics and tracing) to drive three changes. Adaptive capacity standardized instance types and oversubscribed executors per instance after profiling vCPU and executor-count combinations, cutting costs about 70% and error rates about 50% while targeting 50% busy executors at peak. Circuit breakers in the Checkpoint orchestrator defer or cancel CI work when downstream services such as Jenkins, Vitess, Flannel or Search degrade, which stops cascading failures. Tracing the Cypress test runtime exposed runtime variables tied to flakiness, which had been burning roughly 90k compute hours a week.