ci.yml•2.38 kB
name: Continuous Integration
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Verify uv installation
run: uv --version
- name: Install dependencies
run: uv sync
- name: Run tests
run: |
uv run pytest tests/test_basic.py -v
- name: Lint with ruff
continue-on-error: true
run: |
uv run ruff check src/mcp_standards/ || echo "Linting completed with warnings"
- name: Type check with mypy
continue-on-error: true
run: |
uv run mypy src/mcp_standards/ --ignore-missing-imports || echo "Type checking completed with warnings"
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install safety bandit
- name: Security scan with safety
continue-on-error: true
run: |
safety check --json || echo "Safety scan completed"
- name: Security scan with bandit
continue-on-error: true
run: |
bandit -r src/mcp_standards/ -f json || echo "Bandit scan completed"
integration:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install dependencies
run: uv sync
- name: Test MCP server startup
continue-on-error: true
run: |
timeout 5 uv run python run_server.py || true