@samitouri / QOS-React / commits / 0a1f1fcd50

[ci] Cache playwright in run_devtools_e2e_tests (#34320)

I happened to notice that I forgot to cache playwright in run_devtools_e2e_tests, so it would try to install it every time which can randomly take a while to complete (I'm not sure why it's not deterministic, but the dependencies appear to be installed inconsistently across multiple workflows). This PR adds the same cache we use for other steps that use playwright, which should shave off some time from this workflow when the cache is warm. Additionally I omitted the standalone install-deps command as it appears to be redundant and adds a lot of extra time to CI, due to the fact that it installs many unrelated dependencies. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34320). * #34321 * __->__ #34320

lauren committed Aug 27, 2025 at 14:37 UTC 0a1f1fcd5080320139bb51021b4325be65d6e2bd
2 files changed +13 -6
.github/workflows/compiler_playground.yml
-2
@@ -57,8 +57,6 @@ jobs:
57 key: playwright-browsers-v6-${{ runner.arch }}-${{ runner.os }}-${{ steps.playwright_version.outputs.playwright_version }}
58 - run: npx playwright install --with-deps chromium
59 if: steps.cache_playwright_browsers.outputs.cache-hit != 'true'
60 - - run: npx playwright install-deps
61 - if: steps.cache_playwright_browsers.outputs.cache-hit == 'true'
60 - run: CI=true yarn test
61 - run: ls -R test-results
62 if: '!cancelled()'
.github/workflows/runtime_build_and_test.yml
+13 -4
@@ -316,7 +316,7 @@ jobs:
316 if: steps.node_modules.outputs.cache-hit != 'true'
317 - run: ./scripts/react-compiler/build-compiler.sh && ./scripts/react-compiler/link-compiler.sh
318 - run: yarn workspace eslint-plugin-react-hooks test
319 -
319 +
320 # ----- BUILD -----
321 build_and_lint:
322 name: yarn build and lint
@@ -811,9 +811,18 @@ jobs:
811 pattern: _build_*
812 path: build
813 merge-multiple: true
814 - - run: |
815 - npx playwright install
816 - sudo npx playwright install-deps
814 + - name: Check Playwright version
815 + id: playwright_version
816 + run: echo "playwright_version=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//' | head -1)" >> "$GITHUB_OUTPUT"
817 + - name: Cache Playwright Browsers for version ${{ steps.playwright_version.outputs.playwright_version }}
818 + id: cache_playwright_browsers
819 + uses: actions/cache@v4
820 + with:
821 + path: ~/.cache/ms-playwright
822 + key: playwright-browsers-v6-${{ runner.arch }}-${{ runner.os }}-${{ steps.playwright_version.outputs.playwright_version }}
823 + - name: Playwright install deps
824 + if: steps.cache_playwright_browsers.outputs.cache-hit != 'true'
825 + run: npx playwright install --with-deps chromium
826 - run: ./scripts/ci/run_devtools_e2e_tests.js
827 env:
828 RELEASE_CHANNEL: experimental