LanceDB MCP Server
by RyanLisse
- .github
- workflows
name: CI/CD Pipeline
on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
- 'docs/**'
- '.gitignore'
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
- 'docs/**'
- '.gitignore'
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.cache/pre-commit
key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-py${{ matrix.python-version }}-
${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install uv
uv pip install -e ".[dev]"
pip install pytest-cov pytest-xdist
- name: Lint and format check
run: |
black . --check
ruff check .
mypy .
- name: Run tests
run: |
pytest -n auto --cov=lancedb_mcp --cov-report=xml -v tests/
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: true
build:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Check package
run: twine check dist/*