workspace-groups-remote/vendor/dsh-remote-ssh/.github/workflows/upstream-drift.yml

55 lines
3.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: upstream-drift
# 上游 dsh-better-sidebar 每发一版都可能带来**新端点**。本插件用 kind:"exact" 逐个接管它的路由,
# 漏接一个就会让"远程项目里看到的是本地文件 / 写到错位置"这类静默失效回归 —— issue #26(本地绝对
# 路径被推到远端)和 #27(空路径被误判 400)都是这么冒出来的。
#
# 所以这条流水线每周用 @latest 跑一遍全量断言:上游一旦新增端点,对拍断言会红,
# 提醒做一件固定动作(见 MAINTENANCE「升级 better-sidebar 后必做对拍」):
# 1. tar -xzf 上游新包,按 lib/index.js 里的路由/分发找出新增项;
# 2. 在 lib/index.js 里接管(exact 路由 + 两个分支);
# 3. 在 tests/ 补对拍断言,然后跑 node tests/run-all.mjs。
on:
schedule:
- cron: '0 3 * * 1'
workflow_dispatch:
permissions:
contents: read
jobs:
drift:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
# 与 tests.yml 同理:运行时依赖(yaml / schemastery)也要装上,
# 否则 module-load 与 settings-compat 会因为"找不到依赖"而红,
# 那种红与"上游漂移"无关,会把真正的信号盖掉。
#
# `--legacy-peer-deps` 是必需的:npm 7+ 会自动安装 peer。上游 0.28.0 声明
# `@deepseek-ai/dsh-settings@^0.2.1-rc.1`(peer),npm 会把它解析成 0.2.1-rc.2,
# 而后者要求 peer `@deepseek-ai/schemastery@~3.18.5`,与本处固定的 3.18.4 冲突 →
# ERESOLVE,整步失败(2026-10-17 实测)。真实 profile 里**根本没有** dsh-settings
# (只有 schemastery / yaml / better-sidebar,见 MAINTENANCE),所以只装固定的三件、
# 不跟着 peer 走才与真机同构;否则这条流水线会因为别的原因红,掩盖真正的漂移信号。
- name: 装上上游最新版 + 运行时依赖
shell: pwsh
run: |
$ver = (npm view dsh-better-sidebar@latest version).Trim()
$prof = Join-Path $env:USERPROFILE '.dsh\profiles\desktop'
New-Item -ItemType Directory -Force -Path $prof | Out-Null
Set-Content -Path (Join-Path $prof 'package.json') -Value '{"name":"ci-deps","private":true}' -Encoding utf8
npm i --prefix $prof --no-save --no-package-lock --no-audit --no-fund --legacy-peer-deps `
"dsh-better-sidebar@$ver" 'yaml@2.9.1' '@deepseek-ai/schemastery@3.18.4'
$nm = Join-Path $prof 'node_modules'
Write-Host ("对拍基线:better-sidebar = " + (Get-Content (Join-Path $nm 'dsh-better-sidebar\package.json') -Raw | ConvertFrom-Json).version)
Write-Host ("运行时依赖 schemastery = " + (Get-Content (Join-Path $nm '@deepseek-ai\schemastery\package.json') -Raw | ConvertFrom-Json).version)
Write-Host "::notice title=上游版本::$ver"
- name: 全量测试(对拍上游最新版)
run: npm test