diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 5512dfabc..87242ff34 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -39,11 +39,24 @@ jobs: - name: Install PNPM uses: pnpm/action-setup@v4 + - name: Get installed Playwright version + id: playwright-version + run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package-lock.json').dependencies['@playwright/test'].version)")" >> $GITHUB_ENV + + - name: Cache playwright binaries + uses: actions/cache@v3 + id: playwright-cache + with: + path: | + ~/.cache/ms-playwright + key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} + - name: Install pnpm dependencies run: pnpm install - name: Install Playwright Browsers - run: pnpm exec playwright install + run: pnpm exec playwright install --with-deps + if: steps.playwright-cache.outputs.cache-hit != 'true' - name: Run Playwright tests run: pnpm run playwright