From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 2 May 2025 05:51:52 +0000 (-0700) Subject: Development: always try playwright install on ci, cache browsers (#9847) X-Git-Tag: v2.16.0~2^2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b4a52aaa13685d2c7bf9ae3132540c2e02d98b3;p=thirdparty%2Fpaperless-ngx.git Development: always try playwright install on ci, cache browsers (#9847) --- 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