Skip to content

Commit d204d8f

Browse files
committed
[ci] Also cache playground playwright browsers
Following #32678, do the same for the playground e2e test since this step can sometimes take many minutes to complete.
1 parent 87d7e4c commit d204d8f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/compiler_playground.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,21 @@ jobs:
3939
path: |
4040
**/node_modules
4141
key: compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
42+
- name: Store Playwright version
43+
id: playwright_version
44+
run: |
45+
PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')
46+
echo "Playwright's Version: $PLAYWRIGHT_VERSION"
47+
echo "playwright_version=$PLAYWRIGHT_VERSION" >> "$GITHUB_OUTPUT"
48+
- name: Cache Playwright Browsers for Playwright's Version
49+
id: cache_playwright_browsers
50+
uses: actions/cache@v4
51+
with:
52+
path: ~/.cache/ms-playwright
53+
key: playwright-browsers-v6-${{ runner.arch }}-${{ runner.os }}-${{ steps.playwright_version.outputs.playwright_version }}
4254
- run: yarn install --frozen-lockfile
4355
- run: npx playwright install --with-deps chromium
56+
if: steps.cache_playwright_browsers.outputs.cache-hit != 'true'
4457
- run: CI=true yarn test
4558
- run: ls -R test-results
4659
if: '!cancelled()'

0 commit comments

Comments
 (0)