Skip to content

Commit 97f00f1

Browse files
committed
chore: cache playwright deps
1 parent e1aae85 commit 97f00f1

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,22 @@ jobs:
114114
- name: Install dependencies
115115
run: pnpm install --no-frozen-lockfile --ignore-scripts
116116

117+
- name: Get Playwright version
118+
id: playwright-version
119+
run: echo "version=$(jq -r '.devDependencies.playwright' package.json)" >> $GITHUB_OUTPUT
120+
121+
- name: Cache Playwright browsers
122+
uses: actions/cache@v4
123+
id: playwright-cache
124+
with:
125+
path: |
126+
~/.cache/ms-playwright
127+
node_modules/.pnpm/playwright-core*/node_modules/playwright-core/.local-browsers
128+
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}
129+
restore-keys: |
130+
${{ runner.os }}-playwright-
117131
- name: Install Playwright browsers
132+
if: steps.playwright-cache.outputs.cache-hit != 'true'
118133
run: pnpm exec playwright install chromium --with-deps --only-shell
119134

120135
- name: Build Storybook

0 commit comments

Comments
 (0)