name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
schedule:
# Run weekly on Mondays at 6 AM UTC to catch API changes
- cron: '0 6 * * 1'
workflow_dispatch:
# Allow manual triggers
jobs:
test:
name: Test Node ${{ matrix.node-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# Test on multiple OS since MCP servers run locally
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run TypeScript type checking
run: npm run typecheck
- name: Build project
run: npm run build
- name: Run tests
run: npm test
- name: Validate API schema alignment
run: npm run validate-schema