Skip to content

chore(ci): record which unit tests a change reaches, without skipping any - #10593

Merged
waleedlatif1 merged 1 commit into
stagingfrom
ci/vitest-test-selection-shadow
Dec 1, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
ci/vitest-test-selection-shadow

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Adds @useblacksmith/vitest 0.7.0 (pinned; the newest release past the 7-day minimum release age) to the apps/sim unit-test config, CI only (GITHUB_ACTIONS), unit mode only (not integration or live)
  • Runs it in shadow mode: every test still runs; each run records what each test file loads and logs shadow mode: N of M would have been skipped
  • Trial for test selection: apps/sim unit tests take 3–7 min per shard on every PR that touches the app, including content-only PRs that reach one or two test files. Turning selection on is a separate change once the logs show it never skips a test a change could break

Type of Change

  • Chore (CI)

Testing

  • Local run with GITHUB_ACTIONS=true over 25 test files: first run records, second run reports 25 of 25 would have been skipped and still runs all 495 tests
  • Without the flag the plugin is not loaded
  • CI on this PR: unit shards must pass unchanged; logs show whether the record saves to the Actions cache

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

… any

Adds @useblacksmith/vitest to the apps/sim unit run in CI in shadow mode.
Each run records what every test file loads and logs how many files a
selecting run would have skipped, while still running every test. Nothing
about what runs changes; the logs are the evidence for deciding whether to
let PR runs skip unaffected tests.
@waleedlatif1
waleedlatif1 requested a review from a team as a code owner December 1, 2026 18:55
@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Dec 1, 2026 7:02pm UTC

Request Review

@waleedlatif1
waleedlatif1 merged commit c01a6f4 into staging Dec 1, 2026
80 of 82 checks passed
@waleedlatif1
waleedlatif1 deleted the ci/vitest-test-selection-shadow branch December 1, 2026 18:57
@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Low impact] No blocking issues were found; the PR appears safe to merge.

Summary

Adds pinned @useblacksmith/vitest 0.7.0 and enables blacksmith({ shadow: true }) for GitHub Actions runs in test mode.

  • GitHub Actions records which files apps/sim unit tests load.

Reviews (1) · Last reviewed commit: "chore(ci): record which unit tests a cha..." · Reviewed by Greptile

waleedlatif1 added a commit that referenced this pull request Dec 1, 2026
… process (#10597)

The test replaced the global process with a spread copy, which drops
EventEmitter methods such as process.on. Since #10593 added the Blacksmith
vitest plugin in CI (GITHUB_ACTIONS=true), the run calls process.on during the
file and test shard 2/2 failed with "process.on is not a function". Stub only
the env var, and restore it after each test.

This branch was successfully deployed

1 active deployment
Preview — f169e838 Deployed Dec 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant