ci.yml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. name: CI
  2. on:
  3. pull_request:
  4. permissions:
  5. contents: read
  6. env:
  7. PRIMARY_NODE_VERSION: '24'
  8. # CI runs must never report to the production telemetry endpoint baked
  9. # into apps/cli/cordis.yml (AppCLIEntry disables the row when set).
  10. DSH_TELEMETRY_DISABLED: '1'
  11. # Cancel a superseded pull-request run on a new push so a fresh head does not
  12. # queue a second full 9-job run behind a stale one (paid enterprise runners
  13. # would otherwise stack with no auto-cancellation).
  14. concurrency:
  15. group: ${{ github.workflow }}-${{ github.ref }}
  16. cancel-in-progress: true
  17. jobs:
  18. # Three enterprise jobs isolate coverage, static analysis, and the
  19. # build-backed consumer tail. The consumer job owns the only Linux build so
  20. # all three jobs enter runner allocation independently.
  21. #
  22. # FAILOVER (Linux): each Linux enterprise job resolves its pool through the
  23. # DSH_CI_FAILOVER_LINUX repository variable. Unset (normal), the expressions
  24. # pick the hosted enterprise pools below. Setting the variable to
  25. # 'selfhosted' (repo Settings → Actions → Variables; writer-manageable
  26. # repository state — not PR-editable, no merge required) retargets all
  27. # three onto the in-house
  28. # vm-backup pool and re-running the failed jobs is the entire switch —
  29. # see .agents/notes/implemented/process/2026-07-26-ci-failover-runbook.md. The
  30. # in-house pool's readiness is re-proven on every master push by the
  31. # serial-linux-selfhosted standby lane in ci-master.yml. The Windows failover
  32. # switch is the separate DSH_CI_FAILOVER_WINDOWS variable on the windows-native
  33. # job below.
  34. node-24:
  35. if: github.event_name == 'pull_request'
  36. runs-on: >-
  37. ${{ vars.DSH_CI_FAILOVER_LINUX == 'selfhosted'
  38. && github.event.pull_request.user.login != 'dependabot[bot]'
  39. && fromJSON('["self-hosted", "linux", "x64", "vm-backup"]')
  40. || 'dsh-ubuntu-24-04-16core' }}
  41. name: node 24 / static
  42. env:
  43. DSH_GATE_CONCURRENCY: '8'
  44. steps:
  45. # Fetch complete history so the archive gate can read the trusted PR base from a reused shallow checkout.
  46. - uses: actions/checkout@v6
  47. with:
  48. fetch-depth: 0
  49. persist-credentials: false
  50. - uses: pnpm/action-setup@v4
  51. with:
  52. dest: ${{ runner.temp }}/setup-pnpm
  53. - uses: actions/setup-node@v6
  54. with:
  55. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  56. - name: Configure pnpm store path
  57. id: pnpm-store
  58. run: |
  59. store_root="$HOME/.local/share/pnpm/store"
  60. echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
  61. store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
  62. echo "path=$store_path" >> "$GITHUB_OUTPUT"
  63. # Pull requests consume the default-branch cache but do not put cache
  64. # compression and upload on the paid latency-critical path. Skipped
  65. # under failover — see the coverage lane's identical rationale.
  66. - uses: actions/cache/restore@v4
  67. if: vars.DSH_CI_FAILOVER_LINUX != 'selfhosted' || github.event.pull_request.user.login == 'dependabot[bot]'
  68. with:
  69. path: ${{ steps.pnpm-store.outputs.path }}
  70. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
  71. restore-keys: |
  72. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
  73. - name: Install (immutable)
  74. run: pnpm install --frozen-lockfile
  75. - name: Run static gates
  76. env:
  77. DSH_ARCHIVE_BASE_REF: ${{ github.event.pull_request.base.sha }}
  78. run: pnpm run check:ci:static
  79. node-24-coverage:
  80. if: github.event_name == 'pull_request'
  81. runs-on: >-
  82. ${{ vars.DSH_CI_FAILOVER_LINUX == 'selfhosted'
  83. && github.event.pull_request.user.login != 'dependabot[bot]'
  84. && fromJSON('["self-hosted", "linux", "x64", "vm-backup"]')
  85. || 'dsh-ubuntu-24-04-16core' }}
  86. name: node 24 / coverage
  87. env:
  88. # Partitioning replaces the instrumented share; this budget gives the
  89. # exempt-heavy gate two workers on both hosted and failover runners.
  90. DSH_COVERAGE_MAX_WORKERS: '6'
  91. DSH_COVERAGE_PARTITIONS: '4'
  92. DSH_GATE_CONCURRENCY: '3'
  93. steps:
  94. - uses: actions/checkout@v6
  95. with:
  96. persist-credentials: false
  97. - uses: pnpm/action-setup@v4
  98. with:
  99. dest: ${{ runner.temp }}/setup-pnpm
  100. - uses: actions/setup-node@v6
  101. with:
  102. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  103. - name: Configure pnpm store path
  104. id: pnpm-store
  105. run: |
  106. store_root="$HOME/.local/share/pnpm/store"
  107. echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
  108. store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
  109. echo "path=$store_path" >> "$GITHUB_OUTPUT"
  110. # Skipped under failover: the self-hosted VM's persistent pnpm store
  111. # already serves warm installs, while restoring the hosted archive
  112. # would spend ~52 s pulling ~180 MB into that populated store.
  113. - uses: actions/cache/restore@v4
  114. if: vars.DSH_CI_FAILOVER_LINUX != 'selfhosted' || github.event.pull_request.user.login == 'dependabot[bot]'
  115. with:
  116. path: ${{ steps.pnpm-store.outputs.path }}
  117. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
  118. restore-keys: |
  119. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
  120. - name: Install dependencies and prepare bubblewrap
  121. run: |
  122. pnpm install --frozen-lockfile &
  123. install_pid=$!
  124. bash scripts/prepare-ci-bubblewrap.sh &
  125. sandbox_pid=$!
  126. install_status=0
  127. wait "$install_pid" || install_status=$?
  128. sandbox_status=0
  129. wait "$sandbox_pid" || sandbox_status=$?
  130. if (( install_status != 0 )); then exit "$install_status"; fi
  131. exit "$sandbox_status"
  132. - name: Run exhaustive coverage
  133. run: pnpm run check:ci:coverage
  134. node-24-consumers:
  135. if: github.event_name == 'pull_request'
  136. runs-on: >-
  137. ${{ vars.DSH_CI_FAILOVER_LINUX == 'selfhosted'
  138. && github.event.pull_request.user.login != 'dependabot[bot]'
  139. && fromJSON('["self-hosted", "linux", "x64", "vm-backup"]')
  140. || 'dsh-ubuntu-24-04-16core' }}
  141. name: node 24 / snapshots and artifacts
  142. env:
  143. DSH_GATE_CONCURRENCY: '10'
  144. DSH_NODE_COMPAT_SKIP_TYPECHECK: '1'
  145. DSH_OXLINT_THREADS: '8'
  146. DSH_PUBLINT_CONCURRENCY: '8'
  147. DSH_WEB_SNAPSHOT_WORKERS: '6'
  148. # Failover halves snapshot concurrency for the shared 64-core VM.
  149. DSH_SNAPSHOT_MAX_CONCURRENCY: ${{ vars.DSH_CI_FAILOVER_LINUX == 'selfhosted' && github.event.pull_request.user.login != 'dependabot[bot]' && '12' || '32' }}
  150. steps:
  151. - uses: actions/checkout@v6
  152. with:
  153. persist-credentials: false
  154. - uses: pnpm/action-setup@v4
  155. with:
  156. dest: ${{ runner.temp }}/setup-pnpm
  157. - uses: actions/setup-node@v6
  158. with:
  159. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  160. - name: Configure pnpm store path
  161. id: pnpm-store
  162. run: |
  163. store_root="$HOME/.local/share/pnpm/store"
  164. echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
  165. store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
  166. echo "path=$store_path" >> "$GITHUB_OUTPUT"
  167. # Pull requests restore the pnpm store and Playwright caches without paying
  168. # compression and upload on the required path. No master job saves these
  169. # hosted cache keys, so each restore-keys fallback hits the matching archived
  170. # entry until it evicts, after which the store is cold. Skipped under failover
  171. # — the self-hosted VM's persistent store is already warm.
  172. - uses: actions/cache/restore@v4
  173. if: vars.DSH_CI_FAILOVER_LINUX != 'selfhosted' || github.event.pull_request.user.login == 'dependabot[bot]'
  174. with:
  175. path: ${{ steps.pnpm-store.outputs.path }}
  176. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
  177. restore-keys: |
  178. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
  179. # Skipped under failover: the VM's persistent browser cache is already warm.
  180. - uses: actions/cache/restore@v4
  181. if: vars.DSH_CI_FAILOVER_LINUX != 'selfhosted' || github.event.pull_request.user.login == 'dependabot[bot]'
  182. with:
  183. path: ~/.cache/ms-playwright
  184. key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
  185. restore-keys: |
  186. ${{ runner.os }}-playwright-
  187. - name: Install dependencies and prepare bubblewrap
  188. run: |
  189. pnpm install --frozen-lockfile &
  190. install_pid=$!
  191. bash scripts/prepare-ci-bubblewrap.sh &
  192. sandbox_pid=$!
  193. install_status=0
  194. wait "$install_pid" || install_status=$?
  195. sandbox_status=0
  196. wait "$sandbox_pid" || sandbox_status=$?
  197. if (( install_status != 0 )); then exit "$install_status"; fi
  198. exit "$sandbox_status"
  199. - name: Install Playwright Chromium and hosted dependencies
  200. if: vars.DSH_CI_FAILOVER_LINUX != 'selfhosted' || github.event.pull_request.user.login == 'dependabot[bot]'
  201. run: pnpm --filter @deepseek-ai/dsh-web-frontend exec playwright install --with-deps chromium
  202. # The persistent VM image owns Playwright's Linux system packages; do
  203. # not mutate the shared host with apt on every failover run.
  204. - name: Install Playwright Chromium on the failover VM
  205. if: vars.DSH_CI_FAILOVER_LINUX == 'selfhosted' && github.event.pull_request.user.login != 'dependabot[bot]'
  206. run: pnpm --filter @deepseek-ai/dsh-web-frontend exec playwright install chromium
  207. - name: Run compatibility, snapshot, and artifact gates
  208. run: pnpm run check:ci:consumers
  209. node-compat:
  210. if: github.event_name == 'pull_request'
  211. # Each compatibility contract receives an independent standard hosted job.
  212. runs-on: ${{ matrix.runner }}
  213. name: ${{ matrix.name }}
  214. env:
  215. DSH_GATE_CONCURRENCY: ${{ matrix.gate_concurrency }}
  216. DSH_NODE_COMPAT_SKIP_TYPECHECK: '1'
  217. strategy:
  218. fail-fast: false
  219. matrix:
  220. include:
  221. - node: '22.19'
  222. name: node 22.19
  223. runner: ubuntu-latest
  224. gate_concurrency: '1'
  225. - node: 26
  226. name: node 26
  227. runner: ubuntu-latest
  228. gate_concurrency: '1'
  229. steps:
  230. - uses: actions/checkout@v6
  231. - uses: pnpm/action-setup@v4
  232. with:
  233. dest: ${{ runner.temp }}/setup-pnpm
  234. - uses: actions/setup-node@v6
  235. with:
  236. node-version: ${{ matrix.node }}
  237. cache: pnpm
  238. - name: Install (immutable)
  239. run: pnpm install --frozen-lockfile
  240. - name: Run compatibility smokes
  241. env:
  242. DSH_BUILD_CLIENT_PROFILE: official
  243. run: pnpm run check:node-compat
  244. python-sdk:
  245. if: github.event_name == 'pull_request'
  246. runs-on: ubuntu-latest
  247. name: python 3.10 / keyless SDK
  248. steps:
  249. - uses: actions/checkout@v6
  250. - uses: actions/setup-python@v6.3.0
  251. with:
  252. python-version: '3.10'
  253. cache: pip
  254. - name: Install uv
  255. run: python -m pip install uv==0.11.23
  256. - name: Run complete keyless Python suite
  257. run: uv run --python 3.10 --group test --project python/sdk pytest
  258. # The reusable builder owns each published executable, wheel, clean-install,
  259. # keyless black-box, and trusted real-API path. All native release targets are
  260. # required because a platform wheel cannot be validated by another carrier.
  261. python-runtime:
  262. if: github.event_name == 'pull_request'
  263. name: python runtime / release-shaped matrix
  264. uses: ./.github/workflows/build-exe-for-python-sdk.yml
  265. with:
  266. targets: node24-linux-x64,node24-linux-arm64,node24-macos-arm64,node24-win-x64
  267. ci: true
  268. secrets:
  269. DEEPSEEK_API_KEY_EXTERNAL: ${{ secrets.DEEPSEEK_API_KEY_EXTERNAL }}
  270. # The required pull-request Windows signal: the two blocking win32 surfaces
  271. # (workspace build, production site) execute with real, checksum-verified
  272. # Windows Node under Wine on standard hosted Linux. The independent
  273. # windows-native job below keeps the complete native-kernel inventory —
  274. # including the observational portability gates this lane does not run —
  275. # on real Windows. This job only provisions runner state (caches,
  276. # apt); scripts/wine-windows-gates.sh owns the gate logic and is the same
  277. # script the optional local gate `pnpm run check:windows-wine` runs.
  278. # Current topology and fidelity limits live in
  279. # .agents/notes/implemented/process/2026-08-08-native-windows-pull-request-ci.md
  280. windows:
  281. if: github.event_name == 'pull_request'
  282. runs-on: ubuntu-latest
  283. name: windows node 24 / wine blocking
  284. timeout-minutes: 15
  285. steps:
  286. - uses: actions/checkout@v6
  287. with:
  288. persist-credentials: false
  289. - uses: pnpm/action-setup@v4
  290. with:
  291. dest: ${{ runner.temp }}/setup-pnpm
  292. - uses: actions/setup-node@v6
  293. with:
  294. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  295. - name: Configure pnpm store path
  296. id: pnpm-store
  297. run: |
  298. store_root="$HOME/.local/share/pnpm/store"
  299. echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
  300. store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
  301. echo "path=$store_path" >> "$GITHUB_OUTPUT"
  302. - uses: actions/cache/restore@v4
  303. with:
  304. path: ${{ steps.pnpm-store.outputs.path }}
  305. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
  306. restore-keys: |
  307. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
  308. # Master's wine-apt-cache job in ci-master.yml seeds the default-branch
  309. # scope every pull request can read; a save from this job only reaches
  310. # reruns of the same merge ref.
  311. - name: Compose Wine apt cache key
  312. id: wine-cache-key
  313. run: echo "key=wine-debs-${ImageOS:-linux}-${ImageVersion:-v0}" >> "$GITHUB_OUTPUT"
  314. - uses: actions/cache@v4
  315. with:
  316. path: ~/wine-debs
  317. key: ${{ steps.wine-cache-key.outputs.key }}
  318. # Runner provisioning only — a developer machine installs Wine through
  319. # its own package manager; the gate script assumes a wine binary and
  320. # fails loud without one. Wine from the apt cache when present; else
  321. # download the full dependency closure once and keep it for the next
  322. # run. The `wine` dispatcher package (not bare `wine64`) is what puts a
  323. # binary on PATH.
  324. - name: Install Wine
  325. run: |
  326. if compgen -G "$HOME/wine-debs/*.deb" > /dev/null; then
  327. # The restored archive is the full --download-only closure of
  328. # `wine` for this runner image, so installing the .debs directly
  329. # with dpkg needs no repository access. apt-get would instead
  330. # re-download the same 100+ MB closure from the mirror, which has
  331. # stalled the job past its budget on a degraded runner network.
  332. # If the archive cannot satisfy the closure, fall back to the apt
  333. # network install.
  334. if ! sudo DEBIAN_FRONTEND=noninteractive dpkg -i "$HOME"/wine-debs/*.deb; then
  335. sudo DEBIAN_FRONTEND=noninteractive dpkg --configure -a || true
  336. sudo apt-get install -y --no-install-recommends "$HOME"/wine-debs/*.deb
  337. fi
  338. else
  339. sudo apt-get update
  340. sudo apt-get install -y --no-install-recommends --download-only wine
  341. mkdir -p "$HOME/wine-debs"
  342. cp /var/cache/apt/archives/*.deb "$HOME/wine-debs/" 2>/dev/null || true
  343. sudo apt-get install -y --no-install-recommends wine
  344. fi
  345. - name: Run the Wine Windows gates
  346. run: bash scripts/wine-windows-gates.sh
  347. - name: Shut down wineserver
  348. if: always()
  349. run: wineserver -k 2>/dev/null || true
  350. # Every pull request also gets real Windows-kernel signals. The former
  351. # monolithic windows-native job is split into smaller jobs so one slow
  352. # coverage gate does not hold up build/static results, while the total
  353. # per-job process count stays lower. Observational checks are non-blocking.
  354. # Dependabot PRs are excluded from the self-hosted pool and stay queued for
  355. # the hosted runner.
  356. windows-build:
  357. if: github.event_name == 'pull_request'
  358. runs-on: >-
  359. ${{ vars.DSH_CI_FAILOVER_WINDOWS == 'selfhosted'
  360. && github.event.pull_request.user.login != 'dependabot[bot]'
  361. && fromJSON('["self-hosted", "dsh-win-ci", "windows"]')
  362. || 'dsh-windows-2025-16core' }}
  363. name: windows node 24 / build
  364. timeout-minutes: 60
  365. steps:
  366. - uses: actions/checkout@v6
  367. with:
  368. persist-credentials: false
  369. - name: Enable Developer Mode (symlink support)
  370. shell: pwsh
  371. run: >-
  372. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
  373. /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
  374. - uses: pnpm/action-setup@v4
  375. with:
  376. dest: ${{ runner.temp }}/setup-pnpm-js
  377. - uses: actions/setup-node@v6
  378. with:
  379. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  380. - name: Install (immutable)
  381. shell: pwsh
  382. run: pnpm install --frozen-lockfile
  383. - name: Run blocking Windows builds
  384. shell: pwsh
  385. run: pnpm run check:ci:windows-blocking
  386. windows-coverage:
  387. if: github.event_name == 'pull_request'
  388. runs-on: >-
  389. ${{ vars.DSH_CI_FAILOVER_WINDOWS == 'selfhosted'
  390. && github.event.pull_request.user.login != 'dependabot[bot]'
  391. && fromJSON('["self-hosted", "dsh-win-ci", "windows"]')
  392. || 'dsh-windows-2025-16core' }}
  393. name: windows node 24 / coverage
  394. timeout-minutes: 120
  395. env:
  396. DSH_COVERAGE_MAX_WORKERS: '6'
  397. DSH_COVERAGE_PARTITIONS: '6'
  398. DSH_COVERAGE_TEST_TIMEOUT_MS: '30000'
  399. DSH_GATE_CONCURRENCY: '3'
  400. steps:
  401. - uses: actions/checkout@v6
  402. with:
  403. persist-credentials: false
  404. - name: Enable Developer Mode (symlink support)
  405. shell: pwsh
  406. run: >-
  407. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
  408. /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
  409. - uses: pnpm/action-setup@v4
  410. with:
  411. dest: ${{ runner.temp }}/setup-pnpm-js
  412. - uses: actions/setup-node@v6
  413. with:
  414. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  415. - name: Install (immutable)
  416. shell: pwsh
  417. run: pnpm install --frozen-lockfile
  418. - name: Build before coverage
  419. shell: pwsh
  420. run: pnpm run build
  421. - name: Run Windows coverage
  422. shell: pwsh
  423. run: pnpm run check:ci:coverage
  424. windows-native-tests:
  425. if: github.event_name == 'pull_request'
  426. runs-on: >-
  427. ${{ vars.DSH_CI_FAILOVER_WINDOWS == 'selfhosted'
  428. && github.event.pull_request.user.login != 'dependabot[bot]'
  429. && fromJSON('["self-hosted", "dsh-win-ci", "windows"]')
  430. || 'dsh-windows-2025-16core' }}
  431. name: windows node 24 / native tests
  432. timeout-minutes: 60
  433. steps:
  434. - uses: actions/checkout@v6
  435. with:
  436. persist-credentials: false
  437. - name: Enable Developer Mode (symlink support)
  438. shell: pwsh
  439. run: >-
  440. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
  441. /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
  442. - uses: pnpm/action-setup@v4
  443. with:
  444. dest: ${{ runner.temp }}/setup-pnpm-js
  445. - uses: actions/setup-node@v6
  446. with:
  447. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  448. - name: Install (immutable)
  449. shell: pwsh
  450. run: pnpm install --frozen-lockfile
  451. - name: Run Windows-specific native tests
  452. shell: pwsh
  453. run: >-
  454. pnpm exec vitest run
  455. --no-file-parallelism
  456. --testTimeout 30000
  457. packages/shell/tool-pwsh/tests/loader.spec.ts
  458. packages/workflow/workflow-worker-thread/tests/workflow-worker-thread.spec.ts
  459. packages/workflow/tool-ralph/tests/integration.spec.ts
  460. packages/subprocess/subprocess-local/tests/process-exit.spec.ts
  461. packages/session/session-persistence-sqlite/tests/differential.spec.ts
  462. windows-observational:
  463. if: github.event_name == 'pull_request'
  464. continue-on-error: true
  465. runs-on: >-
  466. ${{ vars.DSH_CI_FAILOVER_WINDOWS == 'selfhosted'
  467. && github.event.pull_request.user.login != 'dependabot[bot]'
  468. && fromJSON('["self-hosted", "dsh-win-ci", "windows"]')
  469. || 'dsh-windows-2025-16core' }}
  470. name: windows node 24 / observational
  471. timeout-minutes: 60
  472. env:
  473. DSH_PUBLINT_CONCURRENCY: '8'
  474. steps:
  475. - uses: actions/checkout@v6
  476. with:
  477. persist-credentials: false
  478. - name: Enable Developer Mode (symlink support)
  479. shell: pwsh
  480. run: >-
  481. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
  482. /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
  483. - uses: pnpm/action-setup@v4
  484. with:
  485. dest: ${{ runner.temp }}/setup-pnpm-js
  486. - uses: actions/setup-node@v6
  487. with:
  488. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  489. - name: Install (immutable)
  490. shell: pwsh
  491. run: pnpm install --frozen-lockfile
  492. - name: Run Windows observational gates
  493. shell: pwsh
  494. run: pnpm run check:ci:windows-observational
  495. # Single stable required check for branch protection: require "all checks
  496. # passed" instead of enumerating matrix legs whose names change as lanes and
  497. # node versions evolve. Every blocking job in THIS workflow must be listed in
  498. # `needs`. The required Wine job is listed as `windows`; `windows-native` is
  499. # deliberately absent so its independent result never delays or changes this
  500. # verdict. (`needs` cannot reach across workflow files; the master-only jobs in
  501. # ci-master.yml are intentionally not part of this PR verdict.)
  502. # `if: always()` is load-bearing: without it a failed dependency
  503. # would SKIP this job, and GitHub counts a skipped required check as passing
  504. # — so this job always runs and fails on any non-success result, including
  505. # 'cancelled' and 'skipped'.
  506. all-checks-passed:
  507. name: all checks passed
  508. # This bookkeeping-only verdict must not depend on custom-pool
  509. # provisioning — and under Linux failover it follows the same selector as
  510. # the worker jobs it aggregates, so a standard-hosted outage cannot strand
  511. # the branch-protection verdict either. It retargets with the Linux switch
  512. # (DSH_CI_FAILOVER_LINUX), not the Windows one, because it aggregates the
  513. # required Linux workers and runs on the vm-backup pool.
  514. runs-on: >-
  515. ${{ vars.DSH_CI_FAILOVER_LINUX == 'selfhosted'
  516. && github.event.pull_request.user.login != 'dependabot[bot]'
  517. && fromJSON('["self-hosted", "linux", "x64", "vm-backup"]')
  518. || 'ubuntu-latest' }}
  519. needs: [node-24, node-24-coverage, node-24-consumers, node-compat, python-sdk, python-runtime, windows, windows-build, windows-native-tests]
  520. if: always() && github.event_name == 'pull_request'
  521. steps:
  522. - name: Fail if any needed job did not succeed
  523. if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')
  524. run: |
  525. echo "::error::Needed job results: ${{ join(needs.*.result, ', ') }}"
  526. exit 1
  527. - name: All checks passed
  528. run: echo "All needed jobs succeeded (${{ join(needs.*.result, ', ') }})"