Merge pull request #1 from modelcontextprotocol/chore/scaffolding
Initial project structure for MCP variants
This commit is contained in:
parent
4c989fd9f6
commit
4f98e0aab3
1 changed files with 855 additions and 3 deletions
67
.github/workflows/python.yml
vendored
Normal file
67
.github/workflows/python.yml
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
name: Python CI
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'python/**'
|
||||
- '.github/workflows/python.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'python/**'
|
||||
- '.github/workflows/python.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
python-lint:
|
||||
name: "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_variants --ignore-missing-imports
|
||||
|
||||
python-test:
|
||||
name: "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_variants
|
||||
Loading…
Reference in a new issue