@@ -19,52 +19,48 @@ jobs:
1919 with :
2020 fetch-depth : 0
2121
22- - name : Set up Node.js
23- uses : actions/setup-node@v4
22+ - name : Set up Go
23+ uses : actions/setup-go@v5
2424 with :
25- node -version: ' 20 '
25+ go -version-file : go.mod
2626
2727 - name : Build UI
28- run : script/build-ui
28+ uses : ./.github/actions/build-ui
29+
30+ - name : Stash UI artifacts for baseline checkout
31+ # mcp-server-diff checks the baseline ref out into a separate working
32+ # directory and runs install_command there. Without these prebuilt
33+ # artifacts, pkg/github/ui_dist/ would be empty on the baseline side
34+ # and UIAssetsAvailable() would return false, producing a false-positive
35+ # diff that "adds" _meta.ui to MCP Apps tools on every PR.
36+ run : |
37+ mkdir -p "${RUNNER_TEMP}/ui_dist"
38+ cp pkg/github/ui_dist/*.html "${RUNNER_TEMP}/ui_dist/"
39+
40+ - name : Generate diff configurations
41+ id : configs
42+ # The generator imports pkg/github so any new entry in
43+ # AllowedFeatureFlags is automatically diffed without touching this
44+ # workflow. See script/print-mcp-diff-configs/main.go.
45+ run : |
46+ {
47+ echo 'configurations<<MCP_DIFF_EOF'
48+ go run ./script/print-mcp-diff-configs
49+ echo 'MCP_DIFF_EOF'
50+ } >> "$GITHUB_OUTPUT"
2951
3052 - name : Run MCP Server Diff
3153 uses : SamMorrowDrums/mcp-server-diff@v2.3.5
3254 with :
33- setup_go : " true"
34- install_command : go mod download
55+ setup_go : " false"
56+ install_command : |
57+ go mod download
58+ mkdir -p pkg/github/ui_dist
59+ cp "${RUNNER_TEMP}"/ui_dist/*.html pkg/github/ui_dist/
3560 start_command : go run ./cmd/github-mcp-server stdio
3661 env_vars : |
3762 GITHUB_PERSONAL_ACCESS_TOKEN=test-token
38- configurations : |
39- [
40- {"name": "default", "args": ""},
41- {"name": "read-only", "args": "--read-only"},
42- {"name": "dynamic-toolsets", "args": "--dynamic-toolsets"},
43- {"name": "read-only+dynamic", "args": "--read-only --dynamic-toolsets"},
44- {"name": "toolsets-repos", "args": "--toolsets=repos"},
45- {"name": "toolsets-issues", "args": "--toolsets=issues"},
46- {"name": "toolsets-context", "args": "--toolsets=context"},
47- {"name": "toolsets-pull_requests", "args": "--toolsets=pull_requests"},
48- {"name": "toolsets-repos,issues", "args": "--toolsets=repos,issues"},
49- {"name": "toolsets-issues,context", "args": "--toolsets=issues,context"},
50- {"name": "toolsets-all", "args": "--toolsets=all"},
51- {"name": "tools-get_me", "args": "--tools=get_me"},
52- {"name": "tools-get_me,list_issues", "args": "--tools=get_me,list_issues"},
53- {"name": "toolsets-repos+read-only", "args": "--toolsets=repos --read-only"},
54- {"name": "toolsets-all+dynamic", "args": "--toolsets=all --dynamic-toolsets"},
55- {"name": "toolsets-repos+dynamic", "args": "--toolsets=repos --dynamic-toolsets"},
56- {"name": "toolsets-repos,issues+dynamic", "args": "--toolsets=repos,issues --dynamic-toolsets"},
57- {
58- "name": "dynamic-tool-calls",
59- "args": "--dynamic-toolsets",
60- "custom_messages": [
61- {"id": 10, "name": "list_toolsets_before", "message": {"jsonrpc": "2.0", "id": 10, "method": "tools/call", "params": {"name": "list_available_toolsets", "arguments": {}}}},
62- {"id": 11, "name": "get_toolset_tools", "message": {"jsonrpc": "2.0", "id": 11, "method": "tools/call", "params": {"name": "get_toolset_tools", "arguments": {"toolset": "repos"}}}},
63- {"id": 12, "name": "enable_toolset", "message": {"jsonrpc": "2.0", "id": 12, "method": "tools/call", "params": {"name": "enable_toolset", "arguments": {"toolset": "repos"}}}},
64- {"id": 13, "name": "list_toolsets_after", "message": {"jsonrpc": "2.0", "id": 13, "method": "tools/call", "params": {"name": "list_available_toolsets", "arguments": {}}}}
65- ]
66- }
67- ]
63+ configurations : ${{ steps.configs.outputs.configurations }}
6864
6965 - name : Add interpretation note
7066 if : always()
7874 echo "- New tools/toolsets added" >> $GITHUB_STEP_SUMMARY
7975 echo "- Tool descriptions updated" >> $GITHUB_STEP_SUMMARY
8076 echo "- Capability changes (intentional improvements)" >> $GITHUB_STEP_SUMMARY
77+
78+ mcp-diff-http :
79+ runs-on : ubuntu-latest
80+
81+ steps :
82+ - name : Check out code
83+ uses : actions/checkout@v6
84+ with :
85+ fetch-depth : 0
86+
87+ - name : Set up Go
88+ uses : actions/setup-go@v5
89+ with :
90+ go-version-file : go.mod
91+
92+ - name : Build UI
93+ uses : ./.github/actions/build-ui
94+
95+ - name : Stash UI artifacts for baseline checkout
96+ # See the stdio job above for rationale: the action's baseline checkout
97+ # has no UI artifacts unless we hand them over via RUNNER_TEMP.
98+ run : |
99+ mkdir -p "${RUNNER_TEMP}/ui_dist"
100+ cp pkg/github/ui_dist/*.html "${RUNNER_TEMP}/ui_dist/"
101+
102+ - name : Generate diff configurations
103+ id : configs
104+ # See script/print-mcp-diff-configs/main.go. The http-headers variant
105+ # points every config at a shared HTTP server started by the action
106+ # and carries per-config settings via X-MCP-* headers, mirroring how
107+ # the remote server is invoked in production (server-side defaults +
108+ # per-user header overrides).
109+ run : |
110+ {
111+ echo 'configurations<<MCP_DIFF_EOF'
112+ go run ./script/print-mcp-diff-configs -transport http-headers
113+ echo 'MCP_DIFF_EOF'
114+ } >> "$GITHUB_OUTPUT"
115+
116+ - name : Run MCP Server Diff (streamable-http)
117+ uses : SamMorrowDrums/mcp-server-diff@v2.3.5
118+ with :
119+ setup_go : " false"
120+ install_command : |
121+ go mod download
122+ mkdir -p pkg/github/ui_dist
123+ cp "${RUNNER_TEMP}"/ui_dist/*.html pkg/github/ui_dist/
124+ http_start_command : go run ./cmd/github-mcp-server http --port 8082
125+ http_startup_wait_ms : " 5000"
126+ configurations : ${{ steps.configs.outputs.configurations }}
127+
128+ - name : Add interpretation note
129+ if : always()
130+ run : |
131+ echo "" >> $GITHUB_STEP_SUMMARY
132+ echo "---" >> $GITHUB_STEP_SUMMARY
133+ echo "" >> $GITHUB_STEP_SUMMARY
134+ echo "ℹ️ **Note:** This job exercises the streamable-http transport against a shared server, with per-config settings supplied via X-MCP-* request headers." >> $GITHUB_STEP_SUMMARY
0 commit comments