Guides
Testing examples in CI
Keep docs examples compiling, and optionally run smoke tests before release.
The docs app includes executable JavaScript and Python examples under apps/docs/examples. The validation script checks that those examples still parse. When OMNIST_API_KEY is available, it can also run a tiny live request.
Local checks
bun --filter='@truename/docs' run validate:examples
bun --filter='@truename/docs' run typecheck
bun --filter='@truename/docs' run build
Optional live smoke test
OMNIST_API_KEY="om_sk_..." \
OMNIST_RUN_LIVE_EXAMPLES=1 \
bun --filter='@truename/docs' run validate:examples
Live example tests should stay small. The goal is to catch authentication, endpoint, and response-shape drift before publishing docs, not to load-test the API from CI.
CI workflow
The repository includes a docs workflow that installs dependencies with Bun, validates examples, typechecks the app, and builds the Fumadocs site. It skips live requests unless a CI environment explicitly provides both OMNIST_API_KEY and OMNIST_RUN_LIVE_EXAMPLES=1.