Skip to content

Commit 7736a0a

Browse files
perf(ci): cache dependencies, Jest transforms, and TSC build info + remove duplicate docs:sync (#202)
* perf(ci): cache node_modules and agent .venv in build workflow Adds actions/cache for node_modules (keyed on yarn.lock) and agent/.venv (keyed on uv.lock). Includes timing instrumentation via SECONDS and ::notice annotations to measure cache-hit vs cold install performance across runs. Expected: Install step drops from ~75s (cold) to ~5s (cache hit). Refs #201 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * perf(ci): add Jest transform cache with stable cacheDirectory Sets cacheDirectory to <rootDir>/.jest-cache (off tmpfs, persists locally) and caches it in CI via actions/cache keyed on yarn.lock + commit SHA with restore-keys fallback for cross-branch reuse. Expected: test step drops from ~90s to ~40-50s on cache hit since ts-jest skips re-transpiling unchanged source files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ci: trigger cache-warm run (empty commit) No-op commit to trigger a second CI run where caches are warm. Compare Install/Build timing annotations with the prior cold run. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ci: trigger third run — all caches should be warm Previous warm run missed jest cache (cold run was still saving). Now all three caches are fully saved. This run validates full hit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * perf(ci): cache TypeScript build info and remove duplicate docs:sync - Caches cdk/tsconfig.tsbuildinfo and cli/tsconfig.tsbuildinfo keyed on source file hashes with restore-keys fallback. Enables tsc incremental compilation to skip unchanged files (~10-20s savings). - Removes redundant `//docs:sync` from root tasks.build — already runs as a dependency of `//docs:build` (~5s wasted per build). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): upgrade actions/cache v4.2.3 → v5.0.5 (Node 24 compatible) v4.2.3 runs on Node 20 which is deprecated and will be forced to Node 24 starting June 2, 2026. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): include tsconfig files in TSC cache key Tightens the cache key to invalidate when tsconfig.json or tsconfig.dev.json change, not just source files. Prevents stale .tsbuildinfo from surviving config changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * perf(ci): add explicit incremental: true to CDK and CLI tsconfigs Ensures tsc generates .tsbuildinfo for incremental compilation. While `tsc --build` implies incremental, being explicit guarantees the behavior regardless of invocation mode. Verified locally: CDK compile: 16s cold → 0.16s incremental (99% faster) CLI compile: 4s cold → 0.14s incremental (97% faster) Also adds *.tsbuildinfo to .gitignore. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: bgagent <345885+scottschreckengaust@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 754bd47 commit 7736a0a

6 files changed

Lines changed: 52 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 47 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.gitignore

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cdk/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"node": ">= 20.x <= 24.x"
6666
},
6767
"jest": {
68+
"cacheDirectory": "<rootDir>/.jest-cache",
6869
"coverageProvider": "v8",
6970
"testMatch": [
7071
"<rootDir>/@(src|test)/**/*(*.)@(spec|test).ts?(x)",

cdk/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"incremental": true,
34
"rootDir": "src",
45
"outDir": "lib",
56
"alwaysStrict": true,

cli/tsconfig.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mise.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ run = [
160160
"MISE_EXPERIMENTAL=1 mise //cdk:build",
161161
"MISE_EXPERIMENTAL=1 mise //cli:build",
162162
"MISE_EXPERIMENTAL=1 mise //docs:build",
163-
"MISE_EXPERIMENTAL=1 mise //docs:sync",
164163
]
165164

166165
[tasks.default]

0 commit comments

Comments
 (0)