Skip to content

Commit d13a6e7

Browse files
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 <noreply@anthropic.com>
1 parent 2684e9c commit d13a6e7

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/smoke.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Smoke
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "startup-tpm/**"
8+
pull_request:
9+
branches: [main]
10+
paths:
11+
- "startup-tpm/**"
12+
13+
env:
14+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
15+
16+
jobs:
17+
smoke:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python 3.11
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.11"
26+
27+
- name: Install dependencies
28+
run: pip install cmcp-runtime httpx
29+
30+
- name: Start mock MCP server
31+
run: python startup-tpm/server/mock_mcp_server.py &
32+
33+
- name: Start cMCP gateway
34+
working-directory: startup-tpm
35+
env:
36+
CMCP_DEV_MODE: "1"
37+
run: cmcp start --config cmcp-config.yaml &
38+
39+
- name: Wait for gateway
40+
run: |
41+
for i in $(seq 1 15); do
42+
if curl -sf http://localhost:8443/health > /dev/null 2>&1; then
43+
echo "Gateway ready"
44+
exit 0
45+
fi
46+
echo "Waiting ($i)..."
47+
sleep 2
48+
done
49+
echo "Gateway did not become ready in time" >&2
50+
exit 1
51+
52+
- name: Run agent
53+
run: python startup-tpm/agent/echo_agent.py

0 commit comments

Comments
 (0)