From d13a6e7ff0ba953155c9999a2c8840aa18fdfa8d Mon Sep 17 00:00:00 2001 From: Imran Siddique Date: Fri, 12 Jun 2026 21:29:33 -0700 Subject: [PATCH] feat: add smoke CI workflow for startup-tpm example Runs mock MCP server and cMCP gateway in dev mode, then executes the echo agent end-to-end. Triggers on push and pull_request to main when startup-tpm/** changes. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/smoke.yml | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/smoke.yml diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml new file mode 100644 index 0000000..bce17db --- /dev/null +++ b/.github/workflows/smoke.yml @@ -0,0 +1,53 @@ +name: Smoke + +on: + push: + branches: [main] + paths: + - "startup-tpm/**" + pull_request: + branches: [main] + paths: + - "startup-tpm/**" + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" + +jobs: + smoke: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install dependencies + run: pip install cmcp-runtime httpx + + - name: Start mock MCP server + run: python startup-tpm/server/mock_mcp_server.py & + + - name: Start cMCP gateway + working-directory: startup-tpm + env: + CMCP_DEV_MODE: "1" + run: cmcp start --config cmcp-config.yaml & + + - name: Wait for gateway + run: | + for i in $(seq 1 15); do + if curl -sf http://localhost:8443/health > /dev/null 2>&1; then + echo "Gateway ready" + exit 0 + fi + echo "Waiting ($i)..." + sleep 2 + done + echo "Gateway did not become ready in time" >&2 + exit 1 + + - name: Run agent + run: python startup-tpm/agent/echo_agent.py