Skip to content

docs(release): update examples, skills, CI gates, and release 0.4.0 [5/5] #186

docs(release): update examples, skills, CI gates, and release 0.4.0 [5/5]

docs(release): update examples, skills, CI gates, and release 0.4.0 [5/5] #186

Workflow file for this run

# .github/workflows/ci.yml
name: CI
on:
pull_request:
types: [opened, synchronize, reopened]
# Prevents multiple runs on the same PR from overlapping
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality-gate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to see commit history and changed files
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: "1.3.1"
# Bun install is fast enough that complex caching of node_modules often adds more overhead than it saves.
# We'll rely on Bun's speed. If needed, we can cache ~/.bun/install/cache.
- name: Install dependencies
run: bun install
- name: Check Formatting (warning only)
run: |
bun run format:check || echo "::warning::Formatting issues detected. Run 'bun run format' locally."
- name: Type Check
run: bun run typecheck
- name: Validate Generated SDK (lock integrity)
run: bun run validate:generated
- name: Script Tests (codegen + IR contract)
run: bun run test:scripts
- name: Skill/IR Consistency
run: bun run check:skills
- name: Run Tests (with coverage thresholds)
run: cd packages/sdk && bun run test:coverage
- name: Production Build
run: bun run build
- name: Smoke Test
run: bun run test:smoke
- name: Bundle Size (root entry budget)
run: bun run check:bundle
- name: Consumer Type Surface (public API compiles for a strict-TS consumer)
run: bun run check:consumer-types
- name: Examples Type-Check (repo examples compile against the built surface)
run: bun run check:examples
- name: Publish Readiness (pack + consumer install + subpath imports)
run: bun run publish:readiness
# The published target is Node (engines.node >=18, main: dist/...). The
# gate above runs everything under Bun; this lane re-runs the unit suite
# under Node so a Node-vs-Bun divergence cannot merge green unnoticed.
node-compat:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: "1.3.1"
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
- name: Unit suite under Node (vitest runs on Node here, not Bun)
run: cd packages/sdk && npx vitest run