Skip to content

ci: cache bun install across matrix (needs + shared cache)#16

Merged
say8425 merged 2 commits into
mainfrom
ci/cache-bun-install
May 29, 2026
Merged

ci: cache bun install across matrix (needs + shared cache)#16
say8425 merged 2 commits into
mainfrom
ci/cache-bun-install

Conversation

@say8425

@say8425 say8425 commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

The matrix from #15 re-ran bun install on all 5 runners (5× network installs). This adds a warm-up install job and shares the bun global cache so the install cost is paid effectively once.

  • New install job: checkout → setup-bun → actions/cache (save ~/.bun/install/cache, key bun-<os>-<hash(bun.lock)>) → bun install --frozen-lockfile.
  • The 5 check matrix jobs now needs: install and restore the same cache key. With needs, the install job finishes (and populates the cache) before the checks start, so each check's bun install --frozen-lockfile is a cache hit — no network, ~instant.
  • Matrix parallelism + per-check status (lint/fmt/typecheck/test/build) is preserved; fail-fast: false unchanged.

Note: needs only orders jobs and does not share the filesystem across runners, so each check still runs bun install — but against a warm cache it's offline + fast. The network fetch happens once (install job).

Test Plan

  • YAML parses; name: CI, triggers, concurrency, needs: install, 5-task matrix all intact
  • All five commands pass locally (lint, fmt:check, typecheck, test, build)
  • CI: install job runs first, 5 check jobs hit the cache and go green

🤖 Generated with Claude Code

@say8425 say8425 merged commit a56eef3 into main May 29, 2026
6 checks passed
@say8425 say8425 deleted the ci/cache-bun-install branch May 29, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant