Skip to content

Commit d45f11a

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 d45f11a

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.github/workflows/compiler_playground.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,19 @@ jobs:
4040
**/node_modules
4141
key: compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
4242
- run: yarn install --frozen-lockfile
43+
- name: Check Playwright version
44+
id: playwright_version
45+
run: echo "playwright_version=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//' | head -1)" >> "$GITHUB_OUTPUT"
46+
- name: Cache Playwright Browsers for version ${{ steps.playwright_version.outputs.playwright_version }}
47+
id: cache_playwright_browsers
48+
uses: actions/cache@v4
49+
with:
50+
path: ~/.cache/ms-playwright
51+
key: playwright-browsers-v6-${{ runner.arch }}-${{ runner.os }}-${{ steps.playwright_version.outputs.playwright_version }}
4352
- run: npx playwright install --with-deps chromium
53+
if: steps.cache_playwright_browsers.outputs.cache-hit != 'true'
54+
- run: npx playwright install-deps
55+
if: steps.cache_playwright_browsers.outputs.cache-hit == 'true'
4456
- run: CI=true yarn test
4557
- run: ls -R test-results
4658
if: '!cancelled()'

.github/workflows/runtime_build_and_test.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -599,13 +599,10 @@ jobs:
599599
if: steps.node_modules.outputs.cache-hit != 'true'
600600
- run: yarn --cwd fixtures/flight install --frozen-lockfile
601601
if: steps.node_modules.outputs.cache-hit != 'true'
602-
- name: Store Playwright version
602+
- name: Check Playwright version
603603
id: playwright_version
604-
run: |
605-
PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')
606-
echo "Playwright's Version: $PLAYWRIGHT_VERSION"
607-
echo "playwright_version=$PLAYWRIGHT_VERSION" >> "$GITHUB_OUTPUT"
608-
- name: Cache Playwright Browsers for Playwright's Version
604+
run: echo "playwright_version=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//' | head -1)" >> "$GITHUB_OUTPUT"
605+
- name: Cache Playwright Browsers for version ${{ steps.playwright_version.outputs.playwright_version }}
609606
id: cache_playwright_browsers
610607
uses: actions/cache@v4
611608
with:

0 commit comments

Comments
 (0)