diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c07ab8..6e4b288 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,7 +139,20 @@ jobs: env: BROUTER_URL: http://localhost:17777 - - run: pnpm exec playwright install --with-deps chromium + - name: Cache Playwright browsers + id: playwright-cache + uses: actions/cache@v4 + with: + path: ~/.cache/ms-playwright + key: playwright-${{ hashFiles('pnpm-lock.yaml') }} + + - name: Install Playwright + if: steps.playwright-cache.outputs.cache-hit != 'true' + run: pnpm exec playwright install --with-deps chromium + + - name: Install Playwright deps only + if: steps.playwright-cache.outputs.cache-hit == 'true' + run: pnpm exec playwright install-deps chromium - name: Run E2E tests run: pnpm test:e2e