perf(ci): 修复Frontend Lint的npm缓存假命中问题 #341
Reference in New Issue
Block a user
Delete Branch "feat/frontend-cache-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
Frontend Lint Job每次执行
rm -rf node_modules/*然后npm ci,Docker volume缓存完全失效,缓存等于摆设。优化方案
基于 package-lock.json 的 md5 hash 判断依赖是否变更:
预期收益
验证方式
合并后连续观察3-5次PR的Frontend Lint耗时,对比优化前数据。
CI全绿,自动审批通过。