name: CI
on:
push:
branches: [ main, develop, 'feature/**', 'hotfix/**', 'release/**' ]
pull_request:
branches: [ main, develop ]
# Allow manual trigger for any branch
workflow_dispatch:
# Cancel outdated runs for the same PR/branch
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22, 24, 25]
steps:
- name: Checkout repository
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: Type check
run: npm run typecheck
- name: Lint & format check
run: npm run check
- name: Run tests
run: npm test
- name: Build project
run: npm run build
- name: Test installation
run: |
npm pack
npm install -g ./open-meteo-mcp-server-*.tgz
security:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run security audit
run: npm audit --audit-level high --omit=dev