ci(mcp): publish conformance helper coverage

This commit is contained in:
Joshua Valluru 2026-09-26 11:37:54 -07:00
parent 056c6d927a
commit 61e683f693
3 changed files with 32 additions and 1 deletions

View file

@ -3206,6 +3206,13 @@ jobs:
name: Run owned integration contracts
command: bash .circleci/scripts/run_integration.sh << parameters.suite >> << parameters.mode >>
no_output_timeout: 15m
- when:
condition:
equal: [mcp, << parameters.suite >>]
steps:
- codecov/upload:
file: test-results/integration-mcp/conformance-coverage.xml
flags: mcp-conformance
- run:
name: Stop owned database and Redis
when: always

View file

@ -222,6 +222,12 @@ if [ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ]; then
printf '%s\n' "${node_files[@]}" > "$results/node-files.txt"
fi
test_command=(.venv/bin/python tests/integration/run.py "$suite" --results "$results" "${node_files[@]}")
if [ "$suite" = mcp ]; then
test_command=(.venv/bin/python -m coverage run --rcfile=tests/integration/conformance_coverage.toml \
tests/integration/run.py "$suite" --results "$results" "${node_files[@]}")
fi
env -i PATH="$PATH" HOME="$HOME" PYTHONPATH="$PYTHONPATH" \
INTEGRATION_RUN_ID="$integration_identity" \
DATABASE_URL="$DATABASE_URL" REDIS_HOST="$REDIS_HOST" REDIS_PORT="$REDIS_PORT" \
@ -237,7 +243,16 @@ env -i PATH="$PATH" HOME="$HOME" PYTHONPATH="$PYTHONPATH" \
INTEGRATION_PROXY_READ_REPLICA_URL="$INTEGRATION_PROXY_READ_REPLICA_URL" \
INTEGRATION_ROUTING="$INTEGRATION_ROUTING" \
MCP_CONFORMANCE_ROOT="${MCP_CONFORMANCE_ROOT:-}" \
.venv/bin/python tests/integration/run.py "$suite" --results "$results" "${node_files[@]}"
COVERAGE_FILE="$PWD/$results/.coverage-conformance" "${test_command[@]}"
if [ "$suite" = mcp ]; then
export COVERAGE_FILE="$PWD/$results/.coverage-conformance"
.venv/bin/python -m coverage run --rcfile=tests/integration/conformance_coverage.toml \
-m pytest tests/unit/integration_support/test_conformance.py -q
.venv/bin/python -m coverage combine --rcfile=tests/integration/conformance_coverage.toml
.venv/bin/python -m coverage xml --rcfile=tests/integration/conformance_coverage.toml \
-o "$results/conformance-coverage.xml"
fi
if [ "${INTEGRATION_COVERAGE:-0}" = 1 ]; then
for covered_pid in "$proxy_pid" "$peer_pid"; do

View file

@ -0,0 +1,9 @@
[tool.coverage.run]
branch = true
parallel = true
relative_files = true
patch = ["subprocess"]
include = ["tests/integration/_support/conformance.py"]
[tool.coverage.report]
show_missing = true