From ff73c2f8138b221b7e6fb87f440b75c20f88d77a Mon Sep 17 00:00:00 2001 From: Copilot Date: Fri, 23 Oct 2026 01:55:39 +0300 Subject: [PATCH] chore(ci): give the test job a 30-minute budget and cache Playwright browsers Two stacked-PR runs were cancelled by the 15-minute job budget before vitest finished: setup alone took 10-12 minutes (one Playwright chromium download ran 10m33s vs 22s on a healthy runner) while the suite itself needs ~6 minutes. Cache ~/.cache/ms-playwright keyed on the Playwright version (cache hit installs only OS deps) and raise the budget. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b822a455-fa94-49a2-9127-eee479ab954e --- .github/workflows/squad-ci.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/squad-ci.yml b/.github/workflows/squad-ci.yml index bdcb1a487..eb84b9e0e 100644 --- a/.github/workflows/squad-ci.yml +++ b/.github/workflows/squad-ci.yml @@ -90,7 +90,9 @@ jobs: || needs.changes.result != 'success' || needs.changes.outputs.code == 'true') runs-on: ubuntu-latest - timeout-minutes: 15 + # Setup alone (npm installs + Playwright browser download) has taken 10-12 min on slow + # runners, cancelling the test run mid-way; the suite itself needs ~6 min. + timeout-minutes: 30 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7 - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 #v6 @@ -131,8 +133,23 @@ jobs: done [ "$success" = true ] || { echo "::error::npm ci failed after 3 attempts"; exit 1; } working-directory: docs + - name: Resolve Playwright version + id: playwright + run: echo "version=$(node -p "require('playwright/package.json').version")" >> "$GITHUB_OUTPUT" + - name: Cache Playwright browsers + id: playwright-cache + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: ~/.cache/ms-playwright + key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }} - name: Install Playwright browsers - run: npx playwright install chromium --with-deps + # Browser download is the slow part; with a cache hit only the OS deps are installed. + run: | + if [ "${{ steps.playwright-cache.outputs.cache-hit }}" = "true" ]; then + npx playwright install-deps chromium + else + npx playwright install chromium --with-deps + fi - name: "🔒 Source tree canary check" run: | MISSING=0