chore(ci): enhance CI pipeline by caching Playwright browsers and installing dependencies

This commit is contained in:
taroj1205 2025-06-22 19:53:38 +12:00
parent 583658f2f8
commit 88805655d4
No known key found for this signature in database
GPG key ID: 0FCB6CFFE0981AB7

View file

@ -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()