name: CI
on:
pull_request:
branches: [main]
push:
branches-ignore: [main]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [18.x, 20.x]
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv (Unix)
if: runner.os != 'Windows'
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install uv (Windows)
if: runner.os == 'Windows'
run: |
irm https://astral.sh/uv/install.ps1 | iex
echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install dependencies
run: |
npm ci
uv pip install --system --python python${{ matrix.python-version }} -e .
- name: Run validation
run: npm run validate
- name: Run tests
run: npm test
- name: Test Python import
run: |
python -c "from mcp_server_bwt import version; print('Version:', version.__version__)"
- name: Check package
run: npm run check-publish