[ci] Also cache playground playwright browsers (#32687)
Following #32678, do the same for the playground e2e test since this step can sometimes take many minutes to complete.
lauren committed
Mar 20, 2025 at 13:53 UTC
112224d8d24b127efa1e680403cca2289c1a261b
2 files changed
+15
-6
.github/workflows/compiler_playground.yml
+12
@@ -40,7 +40,19 @@ jobs:
40
**/node_modules
41
key: compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
42
- 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 }}
52
- 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'
56
- run: CI=true yarn test
57
- run: ls -R test-results
58
if: '!cancelled()'
.github/workflows/runtime_build_and_test.yml
+3
-6
@@ -599,13 +599,10 @@ jobs:
599
if: steps.node_modules.outputs.cache-hit != 'true'
600
- run: yarn --cwd fixtures/flight install --frozen-lockfile
601
if: steps.node_modules.outputs.cache-hit != 'true'
602
- - name: Store Playwright version
602
+ - name: Check Playwright version
603
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 }}
606
id: cache_playwright_browsers
607
uses: actions/cache@v4
608
with: