name: Test Python Compatibility
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test-python-versions:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Verify imports (basic smoke test)
run: |
python -c "import mcp; print('MCP SDK imported successfully')"
python -c "import aiohttp; print('aiohttp imported successfully')"
python -c "import yaml; print('PyYAML imported successfully')"
- name: Check MCP server syntax
run: |
python -m py_compile ansible_mcp_server.py
python -m py_compile docker_mcp_podman.py
python -m py_compile ollama_mcp.py
python -m py_compile pihole_mcp.py
python -m py_compile unifi_mcp_optimized.py
python -m py_compile mcp_registry_inspector.py
echo "✅ All MCP servers compile successfully on Python ${{ matrix.python-version }}"
- name: Summary
if: success()
run: |
echo "✅ Python ${{ matrix.python-version }} compatibility verified on ${{ matrix.os }}!"