ci(mcp): publish conformance helper coverage

This commit is contained in:
Joshua Valluru 2026-09-26 11:37:54 -07:00
parent 561fb2427f
commit 1a5cc62d2e
3 changed files with 32 additions and 1 deletions

View file

@ -3171,6 +3171,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

@ -212,6 +212,12 @@ if [ "$suite" = browser ]; then
exit 0
fi
test_command=(.venv/bin/python tests/integration/run.py "$suite" --results "$results")
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")
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" \
@ -226,7 +232,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"
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