Skip to content

Run the Windows unit tests on pull requests to main - #350300

Draft
Bryan Chen (bryanchen-d) wants to merge 2 commits into
mainfrom
copilot/vscode/pr-windows-unit
Draft

Bryan Chen (bryanchen-d) wants to merge 2 commits into
mainfrom
copilot/vscode/pr-windows-unit

Conversation

@bryanchen-d

Copy link
Copy Markdown
Collaborator

Pull requests to main now run Windows / Electron-Unit and Windows / Browser-Unit. Until now these only ran in the merge queue.

Why

Several Windows-only bugs this month showed up only in the merge queue, for example path handling in Copilot's permissionHelpers, getWorktreeFilterOptions and removeWorktree. When that happens, the merge group fails, and so do the groups queued behind it. Running the Windows unit tests on the pull request catches these bugs before they are enqueued.

In merge groups, both jobs finish about 4 minutes after the run starts. The longest Linux job on pull requests takes longer than that, so these jobs shouldn't add to the pull request's wall time.

What changes

  • The windows-tests job of pr.yml now always runs, like the Linux test jobs.
  • The two Windows unit test jobs get the same test plan as their Linux versions (selected-unit-tests and selected-browser-unit-tests). They skip when the plan selects no test.
  • Every other Windows job gets its *_affected input only in the merge queue and on pull requests to release branches. Pull requests to main skip those jobs, as before. This covers integration, extension host, smoke, remote, browser integration and Agent Host E2E.
  • The merge queue and release branches run exactly the same jobs as before.
  • Copilot - Test (Windows) and chat-lib - Test (Windows) are unchanged, and stay merge-queue only.
  • PR Gate already depends on windows-tests, so it reports the new jobs.
  • build/lib/test/detectChanges.test.ts and build/lib/test/agentHostTestSelection.test.ts are updated to match the new conditions.

Authored with Copilot

Pull requests to main now run Windows / Electron-Unit and Windows / Browser-Unit,
with the same test plan as their Linux versions. They finish well within the
time of the Linux jobs, and catch Windows path bugs before the merge queue. The
other Windows jobs still only run in the merge queue and on pull requests to
release branches.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 25, 2026 04:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues blocking the addition of Windows unit checks to main-branch pull requests.

No open issues 🎉

What changed in this PR

This PR brings Windows Electron and browser unit tests into checks for pull requests to main, catching Windows-specific regressions before the merge queue.

Changes:

  • Enables the Windows workflow caller on main-branch PRs, with unit jobs controlled by the existing test-selection outputs.
  • Keeps other Windows test jobs restricted to merge groups and release-branch PRs, preserving their existing coverage.
  • Updates workflow assertions to verify the revised caller conditions and per-job gating.
File Description
build/​lib/​test/​detectChanges.test.ts Updates expectations for Windows workflow invocation, job gating, and runner selection.
build/​lib/​test/​agentHostTestSelection.test.ts Updates Windows integration and Agent Host E2E assertions for input-based gating.
.github/​workflows/​pr.yml Enables Windows unit checks on main-branch PRs while retaining event restrictions for other Windows tests.

Review effort: Balanced

…t tests

As on Linux, so that the Windows unit tests stay within the time of the Linux jobs when a change runs every unit test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

2 participants