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
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,32 @@ jobs:
- name: Run type-check
run: pnpm type-check

# The four repo-root `vitest.setup.*` files were in ZERO tsc programs
# (objectui#3515) — the same shape as `scripts/` before objectui#3494, one
# directory over. They live outside every workspace package, so
# `pnpm type-check` above cannot reach them; the root `tsconfig.json`
# includes only packages/examples/apps; and no consumer IMPORTS them (every
# one names them as a Vitest `setupFiles` runtime path string), so no gated
# program pulls them in transitively either.
#
# Placed after `pnpm type-check`, NOT next to `pnpm type-check:scripts`
# above, and the difference is load-bearing. `tsconfig.scripts.json`'s
# program imports no workspace package, so it can run straight after the
# install; this one must, because `vitest.setup.dom.tsx` side-effect-imports
# @object-ui/components, /fields, /plugin-dashboard and /plugin-grid for
# their registrations. `tsconfig.vitest-setup.json` resolves those through
# each package's own `exports.types`, i.e. its built declarations — which
# exist only after the `^build` that `pnpm type-check` depends on.
# `scripts/__tests__/vitest-setup-type-check.test.ts` pins that ordering.
#
# A direct step, deliberately: this is not a turbo task, so no cache key
# decides its verdict. `pnpm type-check` is cached by turbo and its `inputs`
# would have to hash every root file a program reads (the objectui#3513
# lesson); running this one directly sidesteps that class of half-armed
# gate entirely, exactly as `type-check:scripts` does.
- name: Type-check repo-root vitest setup files
run: pnpm type-check:vitest-setup

# PRs run the suite split across 4 runners. The suite is dominated by fixed
# per-file cost rather than by the assertions: a PR run reported 495s wall
# clock of which only 178s was `tests` — the rest was `setup` (831s
Expand Down
2 changes: 1 addition & 1 deletion content/docs/guide/ci-cd-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ been deleted three months earlier — [#3451](https://github.com/objectstack-ai/
| Job key | Appears as | What it runs | When |
|---|---|---|---|
| `changeset-check` | Changeset Fixed Group Check | `scripts/check-changeset-fixed.mjs` — every workspace package must be in the changeset `fixed` group or explicitly ignored. It checks group *membership*; it does **not** check whether the PR added a changeset. | Every run |
| `type-check` | Type Check | `scripts/check-type-check-coverage.mjs`, then `pnpm check:spec-symbols`, then `pnpm type-check:scripts`, then `pnpm type-check`. The coverage guard runs first because turbo silently skips packages that have no `type-check` script, so a package without one would otherwise read as passing (#2911). `pnpm type-check:scripts` (`tsconfig.scripts.json`) covers `scripts/**/*.ts`, which `pnpm type-check` cannot reach at all — `scripts/` has no package.json, so turbo never walks it, and the coverage guard decides coverage per *package*. Until [#3494](https://github.com/objectstack-ai/objectui/issues/3494) that left the pin tests in `scripts/__tests__/` — including the one pinning this very page — compiled by nothing. | Every run |
| `type-check` | Type Check | `scripts/check-type-check-coverage.mjs`, then `pnpm check:spec-symbols`, then `pnpm type-check:scripts`, then `pnpm type-check`, then `pnpm type-check:vitest-setup`. The coverage guard runs first because turbo silently skips packages that have no `type-check` script, so a package without one would otherwise read as passing (#2911). `pnpm type-check:scripts` (`tsconfig.scripts.json`) covers `scripts/**/*.ts`, which `pnpm type-check` cannot reach at all — `scripts/` has no package.json, so turbo never walks it, and the coverage guard decides coverage per *package*. Until [#3494](https://github.com/objectstack-ai/objectui/issues/3494) that left the pin tests in `scripts/__tests__/` — including the one pinning this very page — compiled by nothing. `pnpm type-check:vitest-setup` (`tsconfig.vitest-setup.json`) closes the same gap for the four repo-root `vitest.setup.*` files, uncovered until [#3515](https://github.com/objectstack-ai/objectui/issues/3515); it runs *last*, after `pnpm type-check`, because `vitest.setup.dom.tsx` side-effect-imports four `@object-ui/*` packages and resolves them through the declarations that turbo's `^build` produces. | Every run |
| `test` | Test (shard N/4) | `pnpm test --shard=N/4` across a 4-runner matrix with `fail-fast: false`, so every shard reports its own failures. No coverage instrumentation — v8 adds 40–100% overhead. | **Pull requests only** |
| `test-coverage` | Test (coverage) | One unsharded `pnpm test:coverage`, uploaded to Codecov. Nothing blocks on it, which is why it is not sharded. | **Push only** |
| `e2e` | Build & E2E | Builds the console with `vite build` (`VITE_BASE_PATH=/console/`), verifies the artifact, then `pnpm test:e2e --project=chromium`. Uploads the Playwright report on failure. | Every run |
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"type-check": "turbo run type-check",
"type-check:coverage": "node scripts/check-type-check-coverage.mjs",
"type-check:scripts": "tsc -p tsconfig.scripts.json",
"type-check:vitest-setup": "tsc -p tsconfig.vitest-setup.json",
"check:spec-symbols": "node scripts/check-spec-symbol-derivation.mjs",
"check:control-bytes": "node scripts/check-control-bytes.mjs",
"cli": "node packages/cli/dist/cli.js",
Expand Down
Loading
Loading