Skip to content

ci: avoid rerunning TypeScript unit tests - #2985

Merged
miguelg719 merged 1 commit into
browserbase:mainfrom
antonvishal:ci/deduplicate-typescript-unit
Sep 19, 2026
Merged

miguelg719 merged 1 commit into
browserbase:mainfrom
antonvishal:ci/deduplicate-typescript-unit

Conversation

@antonvishal

@antonvishal antonvishal commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Change

The TypeScript unit job currently runs turbo run test:unit and then runs root vitest run. The second command repeats the package unit tests, so this change removes it along with the unused Chrome output ID.

Chrome setup and the separate browser job remain unchanged.

The baseline repeated root Vitest step took 81 seconds after Turbo unit tests had already completed. With this change, the TypeScript unit job took 2m 53s, compared with 4m 16s in the baseline.

Coverage check

We verified that removing the root Vitest run does not drop the relevant unit coverage:

  • Root Vitest collects 239 test files; Turbo's test:unit tasks collect 240.
  • 235 files overlap.
  • The four root-only files are all in packages/sdk-ts/tests/browser-runtime, which is already covered by the separate test:browser task.
  • The Browserbase smoke test is also run separately with BROWSERBASE_SMOKE=1.
  • At the test-case level, all 33 root-only cases are browser-runtime tests.
  • Turbo additionally covers 11 example integration-facade cases that root Vitest doesn't select.
  • Package-level Vitest configs can differ from the root config, so we keep each package's existing test:unit command rather than replacing it with the root config.

Validation

On a branch based on the current upstream main:

  • pnpm install --frozen-lockfile passed
  • pnpm build — 14 tasks passed
  • pnpm check — 36 tasks passed
  • pnpm exec turbo run test:unit — 33 tasks passed
  • The exact workflow change passed Build, Check, TypeScript unit, and all 32 integration jobs run 35329939833

The only fork limitation is the Browserbase smoke test, which requires BROWSERBASE_API_KEY.


Summary by cubic

Removes the duplicate root vitest run step from the TypeScript unit job so package unit tests run only once. The browser-runtime specs that root Vitest picked up are already covered by the browser-ts job, so coverage is unchanged.

Written for commit de3f999. Summary will update on new commits.

Review in cubic

@github-actions

Copy link
Copy Markdown
Contributor

This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run.
Approving the latest commit mirrors it into an internal PR owned by the approver.
If new commits are pushed later, the internal PR stays open but is marked stale until someone approves the latest external commit and refreshes it.

@github-actions github-actions Bot added external-contributor Tracks PRs mirrored from external contributor forks. external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. labels Sep 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The latest approval by @miguelg719 could not refresh the mirrored PR automatically (push-failed). The external PR stays open, and the mirrored PR should be updated manually before work continues.

@miguelg719
miguelg719 merged commit d474508 into browserbase:main Sep 19, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. external-contributor Tracks PRs mirrored from external contributor forks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants