temporarily remove mcp outer action tests (#487)

This commit is contained in:
Ashwin Bhat
2025-08-26 09:47:06 -07:00
committed by GitHub
parent 41e5ba9012
commit c05ccc5ce4

View File

@@ -158,134 +158,3 @@ jobs:
fi
echo "✓ All MCP server checks passed with --mcp-config flag!"
# Test the outer action with inline MCP config
test-outer-action-inline-mcp:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4
- name: Setup Bun
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 #v2
- name: Install test MCP server dependencies
run: |
cd base-action/test/mcp-test
bun install
- name: Test outer action with inline MCP config
uses: ./
id: claude-inline-test
with:
prompt: "Use the mcp__test-server__test_tool to test the MCP integration"
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
claude_args: |
--mcp-config '{"mcpServers":{"test-server":{"type":"stdio","command":"bun","args":["base-action/test/mcp-test/simple-mcp-server.ts"],"env":{}}}}'
--allowedTools mcp__test-server__test_tool
- name: Check execution output
run: |
echo "Checking if MCP test tool was used..."
OUTPUT_FILE="${{ steps.claude-inline-test.outputs.execution_file }}"
if [ ! -f "$OUTPUT_FILE" ]; then
echo "Error: Output file not found!"
exit 1
fi
cat $OUTPUT_FILE
# Check if the tool was actually called - looking in assistant messages
if jq -e '.[] | select(.type == "assistant" and .message.content) | .message.content[] | select(.type == "tool_use" and .name == "mcp__test-server__test_tool")' "$OUTPUT_FILE" > /dev/null; then
echo "✓ MCP test tool was called"
# Check the tool result - looking for the user message with tool_result
if jq -e '.[] | select(.type == "user" and .message.content[0].type == "tool_result") | .message.content[0].content[0].text | contains("Test tool response")' "$OUTPUT_FILE" > /dev/null; then
echo "✓ MCP test tool returned expected result"
else
echo "✗ MCP test tool result not as expected"
echo "Tool results in output:"
jq '.[] | select(.type == "user") | .message.content[]? | select(.type == "tool_result")' "$OUTPUT_FILE"
exit 1
fi
else
echo "✗ MCP test tool was not called"
echo "Tools used:"
jq '.[] | select(.type == "assistant" and .message.content) | .message.content[] | select(.type == "tool_use") | .name' "$OUTPUT_FILE"
exit 1
fi
# Test the outer action with file-based MCP config
test-outer-action-file-mcp:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4
- name: Setup Bun
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 #v2
- name: Install test MCP server dependencies
run: |
cd base-action/test/mcp-test
bun install
- name: Create MCP config file
run: |
cat > /tmp/test-mcp-config.json << 'EOF'
{
"mcpServers": {
"test-server": {
"type": "stdio",
"command": "bun",
"args": ["base-action/test/mcp-test/simple-mcp-server.ts"],
"env": {}
}
}
}
EOF
- name: Test outer action with file-based MCP config
uses: ./
id: claude-file-test
with:
prompt: "Use the mcp__test-server__test_tool to test the MCP integration"
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
claude_args: |
--mcp-config /tmp/test-mcp-config.json
--allowedTools mcp__test-server__test_tool
- name: Check tool usage
run: |
echo "Checking if MCP test tool was used..."
OUTPUT_FILE="${{ steps.claude-file-test.outputs.execution_file }}"
if [ ! -f "$OUTPUT_FILE" ]; then
echo "Error: Output file not found!"
exit 1
fi
cat $OUTPUT_FILE
# Check if the tool was actually called - looking in assistant messages
if jq -e '.[] | select(.type == "assistant" and .message.content) | .message.content[] | select(.type == "tool_use" and .name == "mcp__test-server__test_tool")' "$OUTPUT_FILE" > /dev/null; then
echo "✓ MCP test tool was called"
# Check the tool result - looking for the user message with tool_result
if jq -e '.[] | select(.type == "user" and .message.content[0].type == "tool_result") | .message.content[0].content[0].text | contains("Test tool response")' "$OUTPUT_FILE" > /dev/null; then
echo "✓ MCP test tool returned expected result"
else
echo "✗ MCP test tool result not as expected"
echo "Tool results in output:"
jq '.[] | select(.type == "user") | .message.content[]? | select(.type == "tool_result")' "$OUTPUT_FILE"
exit 1
fi
else
echo "✗ MCP test tool was not called"
echo "Tools used:"
jq '.[] | select(.type == "tool") | .name' "$OUTPUT_FILE"
exit 1
fi