Skip to content

The test job is the CI critical path on re-pushes, merge queue, and main #4339

Closed

Description

@sangwook-dev

Problem

The single test job has quietly become the CI critical path in every context except a cold first push. Step-level measurements from two real runs of the same PR (#4101):

Job First push (cold Next cache), run 29749301708 Re-push (warm), run 29752691491
build-sandbox 385s ← critical 206s
test 327s (58s behind) 324s ← critical
build-storybook 164s 167s
  • Re-pushes — the loop contributors actually wait on while iterating on review feedback — are already bottlenecked by test: the per-PR Next.js cache drops build-sandbox to ~3m30s while test stays at ~5m30s.
  • Merge queue (merge_group) and main never run build-sandbox at all, so test is the critical path there outright.
  • Cold first pushes still hide behind build-sandbox, but only by 58 seconds.

test is also the one job that grows linearly with the component count — 359 files / 7,118 tests today. Inside the job: ~30s runner setup + ~284s vitest (413s of test CPU across workers, 54s transform, 110s import, 148s jsdom environment), which shards cleanly.

deploy.yml runs the full suite on main as well, but interleaves it with build/typecheck deploy gates in a single job, so it needs its own restructure rather than the same treatment.


Fix in #4103.

Activity

  1. cixzhang commented on Sep 5, 2026

    @cixzhang
    Contributor

    Thanks for the detailed critical-path analysis. This is fixed on current main by #6051: the UI and Node test projects now run in parallel lanes in both CI and deploy workflows, while the historical test check is retained as a lightweight join. Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions