ci: stop running WSL host tests for UI-only changes (#31243)

This commit is contained in:
Neil
2026-10-20 15:32:46 -07:00
committed by GitHub
parent 34f0951f7d
commit 49e6107ebe
2 changed files with 41 additions and 3 deletions
+1 -3
View File
@@ -9,6 +9,7 @@ name: WSL orcad E2E
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft]
# This lane drives host RPC, not UI; pr.yml owns mobile bundle/render checks.
paths:
- 'src/main/wsl/**'
- 'src/main/runtime/**'
@@ -21,11 +22,8 @@ on:
- 'src/main/orcad/**'
- 'src/main/server/**'
- 'src/main/persistence/**'
- 'mobile/src/**'
- 'src/main/ipc/*wsl*'
- 'src/shared/**'
- 'src/renderer/src/components/native-chat/**'
- 'src/renderer/src/lib/*agent-session*'
- 'config/scripts/*orcad*'
- 'package.json'
- 'pnpm-lock.yaml'
@@ -2,6 +2,7 @@ import { existsSync, readFileSync } from 'node:fs'
import { matchesGlob } from 'node:path'
import { describe, expect, it } from 'vitest'
import { parse } from 'yaml'
import { classifyPrJobs } from './pr-code-change-scope.mjs'
const workflows = {
windows: parse(
@@ -70,6 +71,11 @@ const cases = {
retained: [
'src/main/wsl/wsl-orcad-real-distro-lane.test.ts',
'src/main/wsl/wsl-orcad-deploy.ts',
'src/main/runtime/runtime-rpc.ts',
'src/main/claude/claude-structured-session-state.ts',
'src/shared/agent-session-wire-refusals.ts',
'package.json',
'pnpm-lock.yaml',
'src/main/wsl/wsl-orcad-bridge-test-child.ts',
'src/main/wsl/wsl-orcad.test-fixture.ts',
'src/main/wsl/wsl-orcad.test.json',
@@ -191,3 +197,37 @@ describe.each([
expect(workflowIncludes(paths, [file.replace(/\.ts$/, '.test.ts')])).toBe(false)
})
})
describe('WSL host coverage without UI-only admissions', () => {
const paths = workflows.wsl.on.pull_request.paths
const mobileFiles = [
'mobile/src/session/MobileSessionTabStrip.tsx',
'mobile/src/session/mobile-session-frame-styles.ts'
]
const uiFiles = [
...mobileFiles,
'src/renderer/src/components/native-chat/NativeChatToolRun.tsx',
'src/renderer/src/lib/agent-session-continuation.ts'
]
it.each(uiFiles)('leaves UI-only changes to their own checks: %s', (file) => {
expect(existsSync(new URL(`../../${file}`, import.meta.url)), file).toBe(true)
expect(workflowIncludes(paths, [file])).toBe(false)
})
it('still builds and checks the mobile page for the tab-strip regression example', () => {
expect(workflowIncludes(paths, mobileFiles)).toBe(false)
expect(classifyPrJobs(mobileFiles).mobile_web_app).toBe(true)
})
it.each([
'src/main/wsl/wsl-orcad-deploy.ts',
'src/main/runtime/runtime-rpc.ts',
'src/main/claude/claude-structured-session-state.ts',
'src/shared/agent-session-wire-refusals.ts'
])('retains mixed UI and host changes, including renames: %s', (hostFile) => {
expect(workflowIncludes(paths, uiFiles)).toBe(false)
expect(workflowIncludes(paths, [...uiFiles, hostFile])).toBe(true)
expect(workflowIncludes(paths, [hostFile, ...uiFiles])).toBe(true)
})
})