From 88805655d4d66ab1f5c1337e73ee80a2df86ac07 Mon Sep 17 00:00:00 2001 From: taroj1205 Date: Sun, 22 Jun 2025 19:53:38 +1200 Subject: [PATCH] chore(ci): enhance CI pipeline by caching Playwright browsers and installing dependencies --- .github/workflows/ci-pipeline.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 086b441..2f1b260 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -183,16 +183,9 @@ jobs: needs: [check_changes, setup, build] if: ${{ needs.check_changes.outputs.exists == 'true' }} runs-on: ubuntu-latest - container: - image: mcr.microsoft.com/playwright:v1.53.0-noble - env: - CI: true steps: - uses: actions/checkout@v4 - - name: Configure Git safe directory - run: git config --global --add safe.directory /__w/www/www - - name: Download build artifacts uses: actions/download-artifact@v4 with: @@ -230,9 +223,20 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: pnpm install --frozen-lockfile + - name: Cache Playwright Browsers + uses: actions/cache@v4 + with: + path: ~/.cache/ms-playwright + key: ${{ runner.os }}-playwright-browsers-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: ${{ runner.os }}-playwright-browsers- + + - name: Install Playwright Browsers + run: pnpm exec playwright install --with-deps + - name: Run Playwright Tests (4 Shards) run: pnpm exec turbo run test:e2e:all timeout-minutes: 10 + - name: Upload Playwright Report uses: actions/upload-artifact@v4 if: always()