Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,29 @@ jobs:
env:
NODE_OPTIONS: ""
run: node scripts/validate-observability-configs.mjs
# .tsbuildinfo mutates every run (tsc's own incremental state), unlike node_modules above which is
# immutable per lockfile -- so this needs the run_id-suffixed-key + restore-keys-prefix pattern (always
# creates a new cache entry to save into, restore falls back to the most recent matching prefix) rather
# than the hit-or-miss pattern node_modules uses. Measured ~13.5s cold vs ~3.6s warm locally; tsc
# verifies each file's content hash before trusting cached state, so a fresh checkout's reset mtimes
# can't cause a false cache hit that would mask a real type error.
- name: Restore TypeScript incremental build cache
if: ${{ github.event_name == 'push' || needs.changes.outputs.backend == 'true' }}
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .tsbuildinfo
key: tsbuildinfo-${{ hashFiles('tsconfig.json', 'package-lock.json') }}-${{ github.run_id }}
restore-keys: |
tsbuildinfo-${{ hashFiles('tsconfig.json', 'package-lock.json') }}-
- name: Typecheck
if: ${{ github.event_name == 'push' || needs.changes.outputs.backend == 'true' }}
run: npm run typecheck
- name: Save TypeScript incremental build cache
if: ${{ !cancelled() && (github.event_name == 'push' || needs.changes.outputs.backend == 'true') }}
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .tsbuildinfo
key: tsbuildinfo-${{ hashFiles('tsconfig.json', 'package-lock.json') }}-${{ github.run_id }}
# Moved ahead of "Test with coverage" (#ci-engine-build-order): src/mcp/find-opportunities.ts (root
# backend, since #2281/#3985) imports packages/gittensory-miner/lib/opportunity-fanout.js -- committed,
# pre-built JS -- which itself imports @jsonbored/gittensory-engine. That package's dist/ is gitignored
Expand Down Expand Up @@ -435,8 +455,6 @@ jobs:
run: npm run build --workspace @jsonbored/gittensory-engine
- name: Prepare test reports dir
run: mkdir -p reports/junit
- name: Report runner CPU count (temporary diagnostic)
run: nproc
- name: Test with coverage (shard ${{ matrix.shard }}/6)
id: coverage
env:
Expand Down
8 changes: 7 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
"esModuleInterop": true,
"resolveJsonModule": true,
"forceConsistentCasingInFileNames": true,
"outDir": "dist"
"outDir": "dist",
// CI caches this across runs (validate-code job) to cut typecheck time on an unchanged/mostly-unchanged
// tree -- measured ~13.5s cold vs ~3.6s warm locally. Correctness is unaffected: tsc verifies each file's
// content hash before trusting the cached state, so a fresh checkout's reset mtimes can't cause a false
// cache hit.
"incremental": true,
"tsBuildInfoFile": ".tsbuildinfo"
},
"include": ["src", "test", "scripts/check-engine-parity.ts", "worker-configuration.d.ts", "vitest.config.ts", "vitest.workers.config.ts", "drizzle.config.ts"]
}