Initial project structure for MCP interceptors #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python CI | |
| on: | |
| # Can be called by other workflows | |
| workflow_call: | |
| # Manual trigger | |
| workflow_dispatch: | |
| # Direct triggers (when running standalone) | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'python/**' | |
| - '.github/workflows/python.yml' | |
| pull_request: | |
| paths: | |
| - 'python/**' | |
| - '.github/workflows/python.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| python-lint: | |
| name: "Python Linting" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| cd python/sdk | |
| pip install -e . | |
| pip install ruff mypy | |
| - name: Run Ruff formatter check | |
| run: | | |
| cd python/sdk | |
| ruff format --check . | |
| - name: Run Ruff linter | |
| run: | | |
| cd python/sdk | |
| ruff check . | |
| - name: Run mypy | |
| run: | | |
| cd python/sdk | |
| mypy src/mcp_ext_interceptors --ignore-missing-imports | |
| python-test: | |
| name: "Python Unit Tests" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| cd python/sdk | |
| pip install -e . | |
| pip install pytest pytest-cov | |
| - name: Run tests | |
| run: | | |
| cd python/sdk | |
| pytest -v --cov=src/mcp_ext_interceptors |