ci.yml triggered on push/pull_request for both main and master. master does not exist on the remote (GitHub's default is main, and the stale remote branch was deleted), so that filter could never match. Left alone deliberately: AGENTS.md and bump-version.ts referring to codex/release-vX.Y.Z, which describe the naming pattern for future release branches rather than a specific existing one.
66 lines
2.2 KiB
YAML
66 lines
2.2 KiB
YAML
name: 🧪 CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
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: 1.3.14
|
|
|
|
- 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
|
|
git diff --exit-code dist/mcp/server.js || (echo "::error::dist/mcp/server.js is out of sync with src/. Run 'bun run build:plugin' and commit changes." && exit 1)
|
|
# 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.
|
|
#
|
|
# The diff gate above depends on bun-version being pinned: the minifier allocates
|
|
# identifiers differently across Bun releases, so an unpinned runner rebuilds to
|
|
# different bytes (measured: a bun 1.4.2 rebuild of a 1.3.14-built bundle differed only
|
|
# by renamed minified variables). Keep the pin in step with the committed bundle.
|
|
bun test src/server.test.ts
|
|
|
|
- name: Verify Binary Compilation
|
|
run: |
|
|
mkdir -p dist/bin
|
|
bun run build:binary
|