Skip to content

Merge pull request #1 from Zsailer/working-server #1

Merge pull request #1 from Zsailer/working-server

Merge pull request #1 from Zsailer/working-server #1

Workflow file for this run

name: Tests
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12']
steps:
- 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 -e .[test]
- name: Run linting
run: |
# Install linting tools
pip install flake8 black isort
# Check formatting
black --check --diff .
# Check import sorting
isort --check-only --diff .
# Run flake8
flake8 jupyter_server_docs_mcp tests
- name: Run unit tests
run: |
pytest tests/ -v -m "not slow and not integration" --cov=jupyter_server_docs_mcp --cov-report=xml
- name: Run integration tests
run: |
pytest tests/ -v -m "integration"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: true
test-optional-deps:
runs-on: ubuntu-latest
strategy:
matrix:
extra: [fastmcp, jupyterlab, full]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install with ${{ matrix.extra }} dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[${{ matrix.extra }},test]
- name: Run tests with optional dependencies
run: |
pytest tests/ -v --tb=short