Repository navigation
ci: skip chat-lib tests when pull requests do not touch Copilot - #342257
Merged
Alexandru Dima (alexdima) merged 1 commit intoOct 17, 2026
Merged
Conversation
Move the chat-lib jobs into pr.yml and gate them on the existing copilot change-detection output, so core-only pull requests no longer build and test chat-lib on three platforms. The jobs are separate rather than a matrix because a matrix job skipped by a job-level if: is never expanded and the per-OS required checks would not report. Shared steps live in a composite action, which the now manual-only chat-lib workflow also uses. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes preserve check names and fail-open gating, with no actionable defects identified in static review.
No open issues 🎉
What changed in this PR
Moves chat-lib PR checks into the Code OSS workflow so unrelated changes can skip them while preserving required check names.
Changes:
- Adds three OS-specific jobs gated by Copilot change detection.
- Shares test steps through a composite action.
- Retains manual testing with distinct check names.
No actionable findings remain. Hosted execution and skipped-check reporting remain unverified.
| File | Description |
|---|---|
.github/workflows/pr.yml |
Adds gated chat-lib jobs for all three platforms. |
.github/workflows/chat-lib-package.yml |
Makes testing manual-only and reuses shared steps. |
.github/actions/test-chat-lib/action.yml |
Centralizes extraction, installation, build, and tests. |
.github/actions/detect-changes/detect.ts |
Includes the shared action in Copilot change detection. |
Review effort: Balanced
Alexandru Dima (alexdima)
marked this pull request as ready for review
October 17, 2026 10:25
Alexandru Dima (alexdima)
enabled auto-merge (squash)
October 17, 2026 10:25
Ladislau Szomoru (lszomoru)
approved these changes
Oct 17, 2026
Alexandru Dima (alexdima)
deleted the
agents/skip-chat-lib-tests-opportunity
branch
October 17, 2026 10:28
This was referenced Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
chat-lib testsworkflow runs on every pull request, on Ubuntu, macOS and Windows, even when a pull request does not touch the Copilot extension (for example #342242, which only changed a test undersrc/vs/). Chat-lib is extracted only fromextensions/copilot/,src/vscode-dts/andsrc/typings/thenable.d.ts, all of which are already covered by thecopilotrule indetect-changes.Changes
pr.yml: adds three chat-lib jobs gated onneeds.changes.outputs.copilot, with the same fail-openif:as the Copilot jobs. The job names are unchanged (chat-lib tests (ubuntu-latest|macos-latest|windows-latest)), so the required checks still match, and a skipped job satisfies them.if:(Skipping a matrix job hangs the Pull Request when inner-matrix jobs are required status checks actions/runner#952). It would report a singlechat-lib tests (${{ matrix.os }})check, and the per-OS required checks would stay pending..github/actions/test-chat-lib: a new composite action that holds the shared setup/extract/install/build/test steps, so the three jobs cannot drift apart.chat-lib-package.yml: kept as a manual-only (workflow_dispatch) workflow so chat-lib can still be tested on a branch without a pull request. Its checks use different names (chat-lib manual tests (…)), so a manual run never satisfies or fails the required checks.detect.ts: adds.github/actions/test-chat-lib/to thecopilotrule.npm publishing is unaffected; it runs in Azure Pipelines (
extensions/copilot/build/npm-package*.yml) and runs its own chat-lib tests.Notes for reviewers
copilotoutput also runs chat-lib when the rootpackage.json, the ESLint configuration or the node_modules cache inputs change. This is broader than strictly needed, but keeps a single rule.How to test
detectChangeswith stubbed GitHub inputs: the chat: finish image reveal tests without waiting for the real-time deadline #342242 file givescopilot = false, whileextensions/copilot/...,src/vscode-dts/vscode.d.tsand.github/actions/test-chat-lib/action.ymleach givecopilot = true.npm run eslint -- .github/actions/detect-changes/detect.ts: passed.tsc --noEmitondetect.ts: passed..github/workflows/pr.yml, a shared path, so CI on it runs the chat-lib jobs. Skipping can only be confirmed on a later core-only pull request.workflow_dispatchfrom the default branch.