Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Development: always try playwright install on ci, cache browsers (#9847)

shamoon1b4a52aaa136
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 83cbce290..e29f883bd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -177,12 +177,19 @@ jobs:
~/.pnpm-store
~/.cache
key: ${{ runner.os }}-frontenddeps-${{ hashFiles('src-ui/pnpm-lock.yaml') }}
+ - name: Cache Playwright browsers
+ uses: actions/cache@v4
+ with:
+ path: ~/.cache/ms-playwright
+ key: ${{ runner.os }}-playwright-${{ hashFiles('src-ui/pnpm-lock.yaml') }}
+ restore-keys: |
+ ${{ runner.os }}-playwright-
+ - name: Install Playwright system dependencies
+ run: npx playwright install-deps
- name: Install dependencies
- if: steps.cache-frontend-deps.outputs.cache-hit != 'true'
run: cd src-ui && pnpm install
- - name: Install Playwright
- if: steps.cache-frontend-deps.outputs.cache-hit != 'true'
- run: cd src-ui && pnpm playwright install --with-deps
+ - name: Install Playwright and Browsers
+ run: cd src-ui && pnpm exec playwright install
tests-frontend:
name: "Frontend Tests (Node ${{ matrix.node-version }} - ${{ matrix.shard-index }}/${{ matrix.shard-count }})"
runs-on: ubuntu-24.04
@@ -220,6 +227,13 @@ jobs:
run: cd src-ui && pnpm run lint
- name: Run Jest unit tests
run: cd src-ui && pnpm run test --max-workers=2 --shard=${{ matrix.shard-index }}/${{ matrix.shard-count }}
+ - name: Cache Playwright browsers
+ uses: actions/cache@v4
+ with:
+ path: ~/.cache/ms-playwright
+ key: ${{ runner.os }}-playwright-${{ hashFiles('src-ui/pnpm-lock.yaml') }}
+ restore-keys: |
+ ${{ runner.os }}-playwright-
- name: Run Playwright e2e tests
run: cd src-ui && pnpm exec playwright test --shard ${{ matrix.shard-index }}/${{ matrix.shard-count }}
- name: Upload frontend test results to Codecov