Skip to content

Commit bba43e0

Browse files
DvirDukhanCopilot
andcommitted
ci(mcp): add MCP-tests workflow with FalkorDB service (T2 #649)
New `.github/workflows/mcp-tests.yml` runs `pytest tests/mcp/` against a real FalkorDB service container on port 6379. Triggers only on PRs that touch MCP-relevant paths so the unrelated parts of the repo don't pay the cost. - FalkorDB service with redis-cli ping healthcheck. - uv cache keyed on uv.lock for fast incremental runs. - Sets `FALKORDB_HOST` / `FALKORDB_PORT` env so api/graph.py picks up the service host. - Path filter covers api/mcp/, tests/mcp/, api/llm.py, api/graph.py, pyproject.toml, uv.lock, and the workflow file itself. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 921dccd commit bba43e0

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

.github/workflows/mcp-tests.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: MCP tests
2+
3+
on:
4+
push:
5+
branches: ["main", "staging", "mcp/**"]
6+
paths:
7+
- "api/mcp/**"
8+
- "tests/mcp/**"
9+
- "api/llm.py"
10+
- "api/graph.py"
11+
- "pyproject.toml"
12+
- "uv.lock"
13+
- ".github/workflows/mcp-tests.yml"
14+
pull_request:
15+
paths:
16+
- "api/mcp/**"
17+
- "tests/mcp/**"
18+
- "api/llm.py"
19+
- "api/graph.py"
20+
- "pyproject.toml"
21+
- "uv.lock"
22+
- ".github/workflows/mcp-tests.yml"
23+
workflow_dispatch:
24+
25+
permissions:
26+
contents: read
27+
28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
30+
cancel-in-progress: true
31+
32+
jobs:
33+
mcp-tests:
34+
runs-on: ubuntu-latest
35+
36+
services:
37+
falkordb:
38+
image: falkordb/falkordb:latest
39+
ports:
40+
- 6379:6379
41+
options: >-
42+
--health-cmd "redis-cli ping"
43+
--health-interval 5s
44+
--health-timeout 3s
45+
--health-retries 12
46+
47+
env:
48+
FALKORDB_HOST: localhost
49+
FALKORDB_PORT: "6379"
50+
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
54+
55+
- name: Setup Python
56+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
57+
with:
58+
python-version: "3.12"
59+
60+
- name: Install uv
61+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
62+
with:
63+
version: "latest"
64+
enable-cache: true
65+
cache-dependency-glob: "uv.lock"
66+
67+
- name: Install backend dependencies
68+
run: uv sync --all-extras
69+
70+
- name: Verify FalkorDB reachable
71+
run: |
72+
sudo apt-get update -qq && sudo apt-get install -y redis-tools
73+
redis-cli -h localhost -p 6379 ping
74+
75+
- name: Run MCP test suite
76+
run: uv run pytest tests/mcp/ -v

0 commit comments

Comments
 (0)