chore(20): persistent CI caches — pnpm store + Playwright browsers
- 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
This commit is contained in:
+19
-11
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user