Skip to content

ci: 为 lint 和 tsc 增加依赖缓存 - #2583

Open
Blackgan3 wants to merge 3 commits into
masterfrom
fix-github-workflow-npm-cache
Open

ci: 为 lint 和 tsc 增加依赖缓存#2583
Blackgan3 wants to merge 3 commits into
masterfrom
fix-github-workflow-npm-cache

Conversation

@Blackgan3

@Blackgan3 Blackgan3 commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

变更内容

  • linttsc job 增加共享的 node_modules 缓存
  • 缓存 npm 下载目录、根目录依赖以及各 workspace 的依赖
  • 使用独立的 checks 缓存前缀,与 unit job 缓存隔离,避免恢复缺少 e2e 依赖的缓存
  • 收紧 unit 缓存 key,纳入 OS、CPU 架构和 .npmrc,并使用独立的 unit restore 前缀
  • 精确命中缓存时跳过 npm i;仅命中 restore key 时仍执行 npm i 更新依赖
  • 兼容 UnoCSS 66.10:不再读取已私有化的 uno.blocked,改为在生成后通过公开的 parseToken() 读取 blocked token 状态
  • 单测改用公开 API,并覆盖普通 blocked token、variant blocked token、未知 token 和正常匹配 token

问题说明

UnoCSS 66.10新版本出现单测执行失败,该版本将 blocked 集合从 generator 实例移入私有实现,导致原有单测及 RN UnoCSS 插件访问 uno.blocked 时失败。缓存调整只是触发冷安装并暴露了这处既有兼容问题,本次已同步修复生产代码和测试。

验证结果

  • npm run lint
  • npm run build:tsc
  • npm test -- --runInBand:73/73 个测试套件、592/592 个测试通过
  • npm test -w @mpxjs/unocss-plugin -- --runInBand:2/2 个测试套件、5/5 个测试通过
  • workflow YAML 解析
  • git diff --check

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.

1 participant