From 70fab3ef0e77397882001c053f769a6c1b8094f4 Mon Sep 17 00:00:00 2001 From: Vincent Rubinetti Date: Tue, 13 Aug 2024 14:07:13 -0400 Subject: [PATCH] fix playwright cache --- .github/workflows/test-frontend.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-frontend.yaml b/.github/workflows/test-frontend.yaml index 6903625..b2de1fa 100644 --- a/.github/workflows/test-frontend.yaml +++ b/.github/workflows/test-frontend.yaml @@ -87,6 +87,8 @@ jobs: if: runner.debug == '1' uses: mxschmitt/action-tmate@v3 + # https://github.com/microsoft/playwright/issues/7249 + - name: Get Playwright version run: | PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//') @@ -98,11 +100,15 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/ms-playwright - key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }} + key: playwright-${{ env.PLAYWRIGHT_VERSION }} - - name: Install Playwright + - name: Install Playwright with dependencies if: steps.cache-playwright.outputs.cache-hit != 'true' - run: bunx playwright install --with-deps + run: npx playwright install --with-deps + + - name: Install Playwright's dependencies + if: steps.cache-playwright.outputs.cache-hit == 'true' + run: npx playwright install-deps - name: Run test run: bun run test:e2e