# CI for mcp-server (TypeScript only)
# Triggers on changes to mcp-server or its workspace package dependencies
name: CI — MCP Server

on:
  push:
    branches: [main]
    paths:
      - 'services/mcp-server/**'
      - 'packages/errors/**'
      - 'packages/config/**'
      - 'packages/auth/**'
      - 'packages/fastify-core/**'
      - 'packages/logger/**'
  pull_request:
    branches: [main]
    paths:
      - 'services/mcp-server/**'
      - 'packages/errors/**'
      - 'packages/config/**'
      - 'packages/auth/**'
      - 'packages/fastify-core/**'

jobs:
  typescript:
    name: TypeScript (build + test + typecheck)
    uses: ./.github/workflows/reusable-pnpm-workspace.yml
    with:
      node-version: '22'
      pnpm-version: '10'
      command: |
        pnpm -r --filter @bytelyst/mcp-server... build
        pnpm --filter @bytelyst/mcp-server test
        pnpm --filter @bytelyst/mcp-server exec tsc --noEmit
