ci: use bun check as the CI typecheck (#2363)

This commit is contained in:
JATMN
2026-10-23 13:49:48 -07:00
committed by GitHub
parent 3e81882b97
commit 6c19581985
3 changed files with 9 additions and 8 deletions
+1 -4
View File
@@ -295,10 +295,7 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Typecheck
run: bun run typecheck
- name: Fast typecheck (Bun builtin)
- name: Typecheck (Bun builtin)
run: bun run typecheck:fast
- name: Type tests
+1 -2
View File
@@ -57,12 +57,11 @@ bun install
bun run build
bun run smoke
bun run check
bun run typecheck
bun run typecheck:fast
bun run typecheck:type-tests
```
`bun run typecheck` (tsc) remains authoritative. `bun run typecheck:fast` adds Bun's builtin type checker locally and in CI; use the wrapper because the repository's `check` script shadows `bun check`.
`bun run typecheck:fast` runs Bun's builtin type checker locally and is the CI typecheck; use the wrapper because the repository's `check` script shadows `bun check`. `bun run typecheck:type-tests` also runs in CI for focused TypeScript assertions. `bun run typecheck` (tsc) is available as an additional local check. Keep the `typescript` devDependency for ESLint, `@astrojs/check`, and the focused type tests.
Focused checks:
+7 -2
View File
@@ -271,7 +271,6 @@ Required local preflight:
```bash
bun install --frozen-lockfile
bun run check
bun run typecheck
bun run typecheck:fast
bun run typecheck:type-tests
node bin/openclaude --version
@@ -315,7 +314,7 @@ bun run web:build
Notes on the local preflight:
- `bun run typecheck` uses TypeScript's `tsc` and remains the authoritative typecheck. `bun run typecheck:fast` runs Bun's builtin type checker against the same `tsconfig.json` as an additional local and CI check. Its wrapper resolves the config relative to the script and runs from outside the repository because the package's `check` script shadows `bun check` inside the project. Use `bun run typecheck:fast` from the root or a subdirectory; from elsewhere, use `bun run --cwd /path/to/openclaude typecheck:fast`.
- `bun run typecheck:fast` runs Bun's builtin type checker against `tsconfig.json` and is the CI typecheck. Its wrapper resolves the config relative to the script and runs from outside the repository because the package's `check` script shadows `bun check` inside the project. Use `bun run typecheck:fast` from the root or a subdirectory; from elsewhere, use `bun run --cwd /path/to/openclaude typecheck:fast`. `bun run typecheck:type-tests` also runs in CI and uses TypeScript for focused type assertions. Keep the `typescript` devDependency for these assertions, ESLint, and `@astrojs/check`.
- PR Checks caches Bun package downloads using OS-scoped keys derived from `bun.lock` for root installs and `web/bun.lock` for web installs, with separate restore prefixes. Dependency installs still run with `--frozen-lockfile` on cache hits. Keep the relevant lockfile in sync with dependency changes and run the required local preflight regardless of cache status.
- `bun run check` runs `check:static` (the any-usage budget, smoke build, and deadcode checks), then the full unit pass (`test:full`) — do not run those separately, or you execute work twice.
- `bun run test` runs test files in a shared process and requires Bun's completed JUnit report as well as a successful exit. `test:full` runs all eight native Bun shards serially to release memory between groups. Use `bun run scripts/run-tests.ts --shards=N --shard-index=K` with the same test flags to run only shard K of N. `test:full` then applies the same completion check to the conversation-arc pass and the context-efficiency pass with `HISTORY_SNIP` enabled. Every shard must produce a complete report; a failed shard does not prevent the remaining shards from running. A test that terminates the runner early fails the command, even if it exits with code zero. Each shard has a ten-minute deadline (override with `--shard-timeout-ms=<milliseconds>`), reports its start/end and elapsed time, and kills its process group on timeout or cancellation. A timeout stops the remaining shards and exits nonzero. On Linux, shard output is relayed from temporary regular files; diagnostics remain visible during execution. Temporary reports and logs are removed after the check. CI runs `check:static` in `smoke-and-tests`, runs the eight unit shards as parallel `unit-tests` jobs, and runs each dedicated feature pass once in `dedicated-tests`. Each unit shard builds the CLI before testing. CI caps these jobs at 15 minutes each and the other jobs at five minutes.
@@ -345,6 +344,12 @@ Focused tests:
bun test ./path/to/test-file.test.ts
```
Additional local TypeScript check against the same `tsconfig.json`:
```bash
bun run typecheck
```
Provider/runtime diagnostics:
```bash