From 199e401e62a83a3a1cd88a373a6b8bba06482798 Mon Sep 17 00:00:00 2001 From: Phil Ruff Date: Wed, 19 Aug 2026 18:12:14 +0100 Subject: [PATCH 1/2] ci(perf): drop unused Playwright install from Integration Tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tests-integration ran playwright install --with-deps chromium — a multi-minute apt-get + browser-binary download with zero caching — before every run, despite zero integration-marked tests importing Playwright anywhere in the repo (grep confirmed across tests/ and core/tests/). Browser-driving coverage already lives in the tests-e2e job, which keeps its own copy of this step. --- .github/workflows/ci-quality.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci-quality.yml b/.github/workflows/ci-quality.yml index fe0ab7fa..f9117097 100644 --- a/.github/workflows/ci-quality.yml +++ b/.github/workflows/ci-quality.yml @@ -133,8 +133,6 @@ jobs: run: sudo apt-get install -y libcairo2-dev - name: Install dependencies run: pip install -r requirements.txt coverage - - name: Install Playwright - run: playwright install --with-deps chromium - name: Collect static files run: python manage.py collectstatic --noinput --verbosity 0 - name: Run integration tests From a9f39947cd14c8eed44ef880a14f53bfd73c7b32 Mon Sep 17 00:00:00 2001 From: Phil Ruff Date: Wed, 19 Aug 2026 18:23:17 +0100 Subject: [PATCH 2/2] fix(ci): restore Playwright in Integration Tests, add caching instead Reverts the previous commit's premise: grepping test files for "import playwright" missed that core/tests/test_exports.py's PDF export tests call application code (core/views/__init__.py, sync_ playwright + chromium.launch) that needs a real browser, even though the test file itself never imports playwright directly. Removing the install step broke 3 previously-passing tests (confirmed on this PR's own CI run: test_pdf_export_returns_200/content_type_is_pdf/ includes_financing_section all failed with the browser executable missing). The actual fix for the slow step is caching ~/.cache/ms-playwright keyed on the pinned playwright version (1.62.0) so the ~150-300MB browser download only happens once per cache key instead of every run. System deps (apt-get, not cacheable across fresh runner VMs) still install every run via the lighter `install-deps` on cache hit. --- .github/workflows/ci-quality.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci-quality.yml b/.github/workflows/ci-quality.yml index f9117097..c12eaff1 100644 --- a/.github/workflows/ci-quality.yml +++ b/.github/workflows/ci-quality.yml @@ -133,6 +133,18 @@ jobs: run: sudo apt-get install -y libcairo2-dev - name: Install dependencies run: pip install -r requirements.txt coverage + - name: Cache Playwright browsers + id: playwright-cache + uses: actions/cache@v4 + with: + path: ~/.cache/ms-playwright + key: ${{ runner.os }}-playwright-1.62.0 + - name: Install Playwright + run: playwright install --with-deps chromium + if: steps.playwright-cache.outputs.cache-hit != 'true' + - name: Install Playwright system deps only + run: playwright install-deps chromium + if: steps.playwright-cache.outputs.cache-hit == 'true' - name: Collect static files run: python manage.py collectstatic --noinput --verbosity 0 - name: Run integration tests