Skip to content

Commit f025224

Browse files
committed
Move conformance scripts to .github/actions/conformance/
- Move client.py and run-server.sh to .github/actions/conformance/ - Remove redundant auth-client.py (superseded by client.py) - Drop try/except wrappers in main() - unhandled exceptions already exit non-zero with tracebacks - Update workflow paths accordingly
1 parent f7c1b76 commit f025224

4 files changed

Lines changed: 10 additions & 330 deletions

File tree

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -325,34 +325,21 @@ def main() -> None:
325325
sys.exit(1)
326326

327327
server_url = sys.argv[1]
328-
329-
# Check for explicit scenario override (for manual testing)
330328
scenario = os.environ.get("MCP_CONFORMANCE_SCENARIO")
331329

332330
if scenario:
333331
logger.debug(f"Running explicit scenario '{scenario}' against {server_url}")
334332
handler = HANDLERS.get(scenario)
335-
try:
336-
if handler:
337-
asyncio.run(handler(server_url))
338-
elif scenario.startswith("auth/"):
339-
asyncio.run(run_auth_code_client(server_url))
340-
else:
341-
print(f"Unknown scenario: {scenario}", file=sys.stderr)
342-
sys.exit(1)
343-
except Exception:
344-
logger.exception("Client failed")
333+
if handler:
334+
asyncio.run(handler(server_url))
335+
elif scenario.startswith("auth/"):
336+
asyncio.run(run_auth_code_client(server_url))
337+
else:
338+
print(f"Unknown scenario: {scenario}", file=sys.stderr)
345339
sys.exit(1)
346340
else:
347-
# No explicit scenario - run default auth flow
348-
# The conformance framework tests different behaviors by configuring
349-
# its mock server; our client just needs to handle OAuth properly
350341
logger.debug(f"Running default auth flow against {server_url}")
351-
try:
352-
asyncio.run(run_auth_code_client(server_url))
353-
except Exception:
354-
logger.exception("Client failed")
355-
sys.exit(1)
342+
asyncio.run(run_auth_code_client(server_url))
356343

357344

358345
if __name__ == "__main__":
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PORT="${PORT:-3001}"
55
SERVER_URL="http://localhost:${PORT}/mcp"
66

77
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8-
cd "$SCRIPT_DIR/../.."
8+
cd "$SCRIPT_DIR/../../.."
99

1010
# Start everything-server
1111
uv run --frozen mcp-everything-server --port "$PORT" &

.github/workflows/conformance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
node-version: 24
2929
- run: uv sync --frozen --all-extras --package mcp-everything-server
30-
- run: ./scripts/conformance/run-server.sh
30+
- run: ./.github/actions/conformance/run-server.sh
3131

3232
client-conformance:
3333
runs-on: ubuntu-latest
@@ -42,4 +42,4 @@ jobs:
4242
with:
4343
node-version: 24
4444
- run: uv sync --frozen --all-extras --package mcp
45-
- run: npx @modelcontextprotocol/conformance@0.1.10 client --command 'uv run --frozen python scripts/conformance/client.py' --suite all
45+
- run: npx @modelcontextprotocol/conformance@0.1.10 client --command 'uv run --frozen python .github/actions/conformance/client.py' --suite all

scripts/conformance/auth-client.py

Lines changed: 0 additions & 307 deletions
This file was deleted.

0 commit comments

Comments
 (0)