From 80b20383f171b066eb688a0bb164230610ec5b96 Mon Sep 17 00:00:00 2001 From: Lucas Berger Date: Thu, 18 Jun 2026 21:16:43 -0400 Subject: [PATCH] =?UTF-8?q?chore(20):=20persistent=20CI=20caches=20?= =?UTF-8?q?=E2=80=94=20pnpm=20store=20+=20Playwright=20browsers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - All four pnpm install steps now use --store-dir /pnpm-store --prefer-offline - harness job env adds PLAYWRIGHT_BROWSERS_PATH: /ms-playwright - Updated stale D-PROBE-04 comments to reflect persistent store - Playwright install step gets a comment noting the future runner-image optimization --- .gitea/workflows/ci.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c99841a..c6a7826 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -46,12 +46,12 @@ jobs: - name: Enable pnpm run: corepack enable pnpm - # actions/cache@v4 is intentionally omitted — probe (D-PROBE-04) showed it - # times out on this runner (socket hang-up between runner container and job - # container cache server). pnpm install without cache takes ~30s; acceptable. + # actions/cache@v4 intentionally omitted (D-PROBE-04). Installs now target the + # host-mounted pnpm store at /pnpm-store (see act_runner config.yaml container.options). + # Without the host mount the flag still works — pnpm creates an ephemeral store there. - name: Install dependencies - run: pnpm install --frozen-lockfile + run: pnpm install --frozen-lockfile --store-dir /pnpm-store --prefer-offline - name: Lint run: pnpm lint @@ -104,10 +104,11 @@ jobs: - name: Enable pnpm run: corepack enable pnpm - # actions/cache@v4 intentionally omitted — same reasoning as fast-checks job (D-PROBE-04). + # actions/cache@v4 intentionally omitted (D-PROBE-04). Installs now target the + # host-mounted pnpm store at /pnpm-store (see act_runner config.yaml container.options). - name: Install dependencies - run: pnpm install --frozen-lockfile + run: pnpm install --frozen-lockfile --store-dir /pnpm-store --prefer-offline # Pitfall 11: service container healthy != MariaDB accepting connections. # No mysql CLI in the runner image (D-PROBE-03); poll via the already-installed @@ -181,6 +182,9 @@ jobs: DB_USER: familysync DB_PASSWORD: testpass DB_NAME: familysync + # Persist Playwright browser binaries across runs via host-mounted /ms-playwright. + # Without the host mount CI still works — binaries are downloaded to the ephemeral dir. + PLAYWRIGHT_BROWSERS_PATH: /ms-playwright steps: - uses: actions/checkout@v4 @@ -191,10 +195,11 @@ jobs: - name: Enable pnpm run: corepack enable pnpm - # actions/cache@v4 intentionally omitted — same reasoning as fast-checks job (D-PROBE-04). + # actions/cache@v4 intentionally omitted (D-PROBE-04). Installs now target the + # host-mounted pnpm store at /pnpm-store (see act_runner config.yaml container.options). - name: Install dependencies - run: pnpm install --frozen-lockfile + run: pnpm install --frozen-lockfile --store-dir /pnpm-store --prefer-offline # Pitfall 11: service container healthy != MariaDB accepting connections. # No mysql CLI in the runner image (D-PROBE-03); poll via the mysql2 driver @@ -270,7 +275,9 @@ jobs: # Install Playwright browsers with system deps BEFORE starting the API, so the long # browser download does not run during the API's lifetime. # Must run from apps/pwa/ where @playwright/test is installed (D-PROBE-05 confirmed exit 0). - # Do NOT cache browser binaries — Playwright explicitly recommends against it in CI. + # PLAYWRIGHT_BROWSERS_PATH=/ms-playwright (job-level env) persists binaries across runs via + # the host-mounted dir. The --with-deps apt step cannot be cached; baking a runner image + # with browsers preinstalled would also drop the --with-deps apt step (future optimization). - name: Install Playwright browsers run: npx playwright install --with-deps webkit chromium working-directory: apps/pwa @@ -462,7 +469,8 @@ jobs: --exit-code 1 # ── pnpm audit + outdated (code-change PRs only, D-12) ─────────────────── - # actions/cache@v4 intentionally omitted — same reasoning as fast-checks job (D-PROBE-04). + # actions/cache@v4 intentionally omitted (D-PROBE-04). Installs now target the + # host-mounted pnpm store at /pnpm-store (see act_runner config.yaml container.options). - uses: actions/setup-node@v4 if: needs.changes.outputs.code == 'true' @@ -475,7 +483,7 @@ jobs: - name: Install dependencies if: needs.changes.outputs.code == 'true' - run: pnpm install --frozen-lockfile + run: pnpm install --frozen-lockfile --store-dir /pnpm-store --prefer-offline - name: Dependency audit (blocking on High+Critical) if: needs.changes.outputs.code == 'true'