chore(ci): persistent pnpm store + Playwright caches (and Dockerfile BuildKit cache) #27

Merged
luckberg merged 4 commits from gsd/quick-260618-tg2-ci-dep-cache into main 2026-06-18 21:32:08 -04:00
Owner

Summary

Cut the Gitea runner's repeat dependency downloads by pointing CI + the image build at persistent caches (no Verdaccio yet). Avoids actions/cache@v4, which times out on this runner (D-PROBE-04).

Changes

.gitea/workflows/ci.yml

  • All four pnpm install --frozen-lockfile steps (fast-checks, api, harness, security) now append --store-dir /pnpm-store --prefer-offline → installs hard-link/copy from a host-mounted store instead of re-downloading.
  • The harness job sets PLAYWRIGHT_BROWSERS_PATH=/ms-playwright (job-level env) so the WebKit/Chromium binaries persist across runs instead of re-downloading every run.

apps/api/Dockerfile

  • # syntax=docker/dockerfile:1 + BuildKit RUN --mount=type=cache,target=/pnpm-store,sharing=locked … --store-dir /pnpm-store on all three install stages (builder, pwa-builder, production), so the publish image build reuses a persistent pnpm store. sharing=locked because builder + pwa-builder run in parallel.

.gitea/workflows/publish.yml

  • DOCKER_BUILDKIT=1 on the build step — the publish path uses plain docker build, and the legacy builder would fail on the --mount syntax.

docs/DEVELOPMENT.md

  • Documents the two container cache paths and that they require act_runner config.yaml container.options host mounts (a manual host change) — without them CI still works, just uncached.

Required host change (separate, not in this PR)

The act_runner config.yaml needs:

container:
  options: "-v <host>/pnpm-store:/pnpm-store -v <host>/ms-playwright:/ms-playwright"

Until that lands, these caches no-op gracefully (ephemeral dirs) — CI stays green either way.

Out of scope (deferred)

  • Verdaccio / npm registry mirror.

🤖 Generated with Claude Code

## Summary Cut the Gitea runner's repeat dependency downloads by pointing CI + the image build at **persistent caches** (no Verdaccio yet). Avoids `actions/cache@v4`, which times out on this runner (D-PROBE-04). ## Changes **`.gitea/workflows/ci.yml`** - All four `pnpm install --frozen-lockfile` steps (fast-checks, api, harness, security) now append `--store-dir /pnpm-store --prefer-offline` → installs hard-link/copy from a host-mounted store instead of re-downloading. - The `harness` job sets `PLAYWRIGHT_BROWSERS_PATH=/ms-playwright` (job-level env) so the WebKit/Chromium binaries persist across runs instead of re-downloading every run. **`apps/api/Dockerfile`** - `# syntax=docker/dockerfile:1` + BuildKit `RUN --mount=type=cache,target=/pnpm-store,sharing=locked … --store-dir /pnpm-store` on all three install stages (builder, pwa-builder, production), so the publish image build reuses a persistent pnpm store. `sharing=locked` because builder + pwa-builder run in parallel. **`.gitea/workflows/publish.yml`** - `DOCKER_BUILDKIT=1` on the build step — the publish path uses plain `docker build`, and the legacy builder would fail on the `--mount` syntax. **`docs/DEVELOPMENT.md`** - Documents the two container cache paths and that they require act_runner `config.yaml` `container.options` **host mounts** (a manual host change) — without them CI still works, just uncached. ## Required host change (separate, not in this PR) The act_runner `config.yaml` needs: ``` container: options: "-v <host>/pnpm-store:/pnpm-store -v <host>/ms-playwright:/ms-playwright" ``` Until that lands, these caches no-op gracefully (ephemeral dirs) — CI stays green either way. ## Out of scope (deferred) - Verdaccio / npm registry mirror. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
luckberg added 4 commits 2026-06-18 21:22:06 -04:00
- 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
- Add "CI dependency caches" subsection to CI Pipeline Overview
- Lists /pnpm-store and /ms-playwright container paths
- Notes act_runner config.yaml container.options host-mount requirement
- Clarifies that CI still works without the mounts (ephemeral fallback)
Add 'RUN --mount=type=cache,target=/pnpm-store' to all 3 pnpm install
stages (builder/pwa-builder/production) with --store-dir /pnpm-store, plus
the '# syntax=docker/dockerfile:1' directive. Set DOCKER_BUILDKIT=1 on the
publish build step so the legacy builder can't break on the mount syntax.
sharing=locked because builder and pwa-builder run in parallel.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
docs(quick-260618-tg2): persistent CI dependency caches (pnpm store + Playwright + Dockerfile)
CI / changes (pull_request) Successful in 4s
CI / api (pull_request) Successful in 2m6s
CI / fast-checks (pull_request) Successful in 2m32s
CI / security (pull_request) Successful in 1m2s
CI / harness (pull_request) Successful in 5m36s
CI / gate (pull_request) Successful in 2s
c5cdb9c21d
luckberg merged commit 6cc3b8ae27 into main 2026-06-18 21:32:08 -04:00
luckberg deleted branch gsd/quick-260618-tg2-ci-dep-cache 2026-06-18 21:32:09 -04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: luckberg/familysync#27