Skip to content

Commit 81a0c06

Browse files
committed
feat: 增加playwright浏览器安装缓存
1 parent 2aebd22 commit 81a0c06

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,17 @@ jobs:
171171
- name: 构建项目
172172
run: pnpm build
173173

174+
- name: 缓存 Playwright 浏览器
175+
uses: actions/cache@v4
176+
id: playwright-cache
177+
with:
178+
path: ~/.cache/ms-playwright
179+
key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }}
180+
restore-keys: |
181+
${{ runner.os }}-playwright-
182+
174183
- name: 安装 Playwright 浏览器
184+
if: steps.playwright-cache.outputs.cache-hit != 'true'
175185
run: pnpm exec playwright install --with-deps chromium
176186

177187
- name: 运行 URL 重定向测试

0 commit comments

Comments
 (0)