name: 🧪 CI on: push: branches: - main - master pull_request: branches: - main - master workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: read jobs: test-and-check: name: 🧪 Test, Type-Check & Build Validation runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Bun uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: Install dependencies run: bun install --frozen-lockfile - name: Type-check run: bun run check - name: Colocated Unit Tests run: bun test - name: Build OpenAPI & Validate Sync run: | bun run openapi:bundle git diff --exit-code dist/openapi.json || (echo "::error::dist/openapi.json is out of sync with openapi/openapi.yaml. Run 'bun run openapi:bundle' and commit changes." && exit 1) - name: Build MCP Plugin & Verify run: | bun run build:plugin # Boot the freshly built bundle and complete an MCP handshake. A bundle that cannot start # is invisible to source-level tests — this has regressed before, when circular imports # scrambled zod's initialisation order and shipped an entry point that never answered. # Re-running the server tests here points them at the artifact just built, not the # committed one. # # Deliberately no byte-for-byte check that the committed bundle matches a fresh build: # the minifier allocates identifiers differently across platforms and Bun versions, so it # is not reproducible across runners. Measured on this PR: an ubuntu rebuild of the # macOS-built committed file differed only by renamed minified variables (N/S, A/I, q/p). bun test src/server.test.ts - name: Verify Binary Compilation run: | mkdir -p dist/bin bun run build:binary