Files
OpenBB/.github/workflows/test-unit-mcp-server.yml
Danglewood b48accbdd4 [V5] openbb-mcp-server: Refactor for v5 - Spec, Config, Packaging, Test Coverage (#7495)
* stash some changes

* add more robust testing

* mypy

* point PR at V5

* introduce spec file

* codespell

* test fix

* fix workflow environment setup

* fix workflow environment setup

* fix workflow environment setup

* add pyyaml to dependencies

* split lint jobs

* fix workflow environment setup

* fix workflow environment setup

* workflow env setup

* workflow env setup

* clean up code comments

* add auth hook entrypoints

* codespell

* add codegen feature

* codespell

* move _unpack into dispatchers for consistency with codegen packages

* surface nested models in the response

* fix missing coverage in CI

* socrata updates

* test fix

* detect plotly output

* add --include and --exclude flags from generate-extension command

* refactor mcp server for v5

* test action

* fix tests

* tests

* test fixture name

* revert: drop unrelated provider/README changes from mcp-server refactor

Strip the changes to ``README.md`` and ``openbb_platform/providers/{imf,
tradingeconomics,yfinance}`` that snuck into 4ac3602 (refactor mcp server
for v5). Those files are out of scope for the mcp-server work and were
modified inadvertently — restore them to their pre-4ac3602 state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* tests and workflows

* fix workflow

* tests and workflows

* tests and workflows

* tests and workflows

* tests and workflows

* beartype shim for 3.15

* muck around with beartype for 3.15

* muck around with beartype for 3.15

* no 3.15 runners for mcp-server

* update skill files

* cap test matrix at python 3.14

* merge branch v5

* no useless comments

* platform controller command description split

* merge URL overloads from path params

* exclude none and unset from model dump

* refactor for fastmcp4

* wrap markdown lines that are too long

---------

Co-authored-by: deeleeramone <>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-09-24 20:04:13 -07:00

134 lines
3.9 KiB
YAML
Vendored

name: 🧪 test openbb-mcp-server
on:
pull_request:
branches: [develop, main, v5]
paths:
- "openbb_platform/extensions/mcp_server/**"
- "openbb_platform/core/**"
- "cli/**"
- ".github/workflows/test-unit-mcp-server.yml"
merge_group:
types: [checks_requested]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: test-openbb-mcp-server-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build sdist + wheel
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: openbb_platform/extensions/mcp_server
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.11"
- run: python -m pip install --upgrade pip uv
- name: Build sdist + wheel
run: uv build --no-sources
- uses: actions/upload-artifact@v5
with:
name: openbb-mcp-server-dist
path: openbb_platform/extensions/mcp_server/dist/
if-no-files-found: error
retention-days: 7
lint:
name: Lint (ruff + ty)
needs: build
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: openbb_platform/extensions/mcp_server
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.11"
- run: python -m pip install --upgrade pip uv
- uses: actions/download-artifact@v5
with:
name: openbb-mcp-server-dist
path: openbb_platform/extensions/mcp_server/dist
- name: Install dependencies then openbb-mcp-server wheel
run: |
uv pip install --system ../../core
uv pip install --system --no-sources ../../../cli tests/fixtures/openbb_mcp_fixture
uv pip install --system --no-sources --group dev
uv pip install --system --no-sources dist/openbb_mcp_server-*.whl
- name: ruff check
run: ruff check openbb_mcp_server tests
- name: ruff format --check
run: ruff format --check openbb_mcp_server tests
- name: ty check
run: ty check openbb_mcp_server
test:
name: Test (${{ matrix.os }} / Python ${{ matrix.python_version }})
needs: build
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, python_version: "3.10" }
- { os: ubuntu-latest, python_version: "3.11" }
- { os: ubuntu-latest, python_version: "3.12" }
- { os: ubuntu-latest, python_version: "3.13" }
- { os: ubuntu-latest, python_version: "3.14" }
- { os: macos-latest, python_version: "3.10" }
- { os: macos-latest, python_version: "3.14" }
- { os: windows-latest, python_version: "3.10" }
- { os: windows-latest, python_version: "3.14" }
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
working-directory: openbb_platform/extensions/mcp_server
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python_version }}
allow-prereleases: true
- uses: actions/download-artifact@v5
with:
name: openbb-mcp-server-dist
path: openbb_platform/extensions/mcp_server/dist
- run: python -m pip install --upgrade pip uv
- name: Install dependencies then openbb-mcp-server wheel
run: |
uv pip install --system ../../core
uv pip install --system --no-sources ../../../cli tests/fixtures/openbb_mcp_fixture
uv pip install --system --no-sources --group dev
uv pip install --system --no-sources dist/openbb_mcp_server-*.whl
- name: Test the installed wheel
run: |
rm -rf openbb_mcp_server
pytest tests --cov=openbb_mcp_server --cov-branch --cov-report=term-missing --cov-fail-under=100