-
Notifications
You must be signed in to change notification settings - Fork 0
161 lines (130 loc) · 5.26 KB
/
test-mcp-builds.yml
File metadata and controls
161 lines (130 loc) · 5.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: Test MCP Docker Builds
on:
push:
branches: [ main, feature/* ]
paths:
- 'obol-adk/dockerfiles/**'
- 'obol-adk/obol-agent-docker/**'
- 'obol-adk/Dockerfile'
- 'obol-adk/requirements.txt'
- 'obol-adk/main.py'
- '.github/workflows/test-mcp-builds.yml'
pull_request:
branches: [ main ]
paths:
- 'obol-adk/dockerfiles/**'
- 'obol-adk/obol-agent-docker/**'
- 'obol-adk/Dockerfile'
- 'obol-adk/requirements.txt'
- 'obol-adk/main.py'
- '.github/workflows/test-mcp-builds.yml'
jobs:
test-mcp-filesystem-pull:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Pull official MCP filesystem image
run: |
docker pull mcp/filesystem
- name: Test official filesystem MCP image
run: |
# Test that the image was pulled successfully
docker images | grep mcp/filesystem
# Test basic functionality
echo "Testing official MCP filesystem server"
test-foundry-mcp:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build foundry MCP image
run: |
docker build -f obol-adk/dockerfiles/Dockerfile.foundry \
-t foundry-mcp:test \
obol-adk/dockerfiles
- name: Test foundry MCP image
run: |
# Test that the image was built successfully
docker images | grep foundry-mcp
# Test that foundry tools are available
docker run --rm foundry-mcp:test forge --version
docker run --rm foundry-mcp:test anvil --version
# Test that the MCP server was built
docker run --rm foundry-mcp:test ls -la /app/dist/
# Test that the MCP server can start (will timeout but shows it runs)
timeout 5s docker run --rm foundry-mcp:test node /app/dist/index.js || true
test-obol-mcp:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build obol MCP image
run: |
docker build -f obol-adk/obol-agent-docker/Dockerfile \
-t obol-mcp:test \
obol-adk/obol-agent-docker
- name: Test obol MCP image
run: |
# Test that the image was built successfully
docker images | grep obol-mcp
# Test that required Python packages are installed
docker run --rm obol-mcp:test python -c "import fastmcp, httpx, uvicorn; print('All packages imported successfully')"
# Test that server file exists
docker run --rm obol-mcp:test ls -la /server/server.py
test-obol-adk:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build obol-adk image
run: |
docker build -f obol-adk/Dockerfile \
-t obol-adk:test \
obol-adk
- name: Test obol-adk image
run: |
# Test that the image was built successfully
docker images | grep obol-adk
# Test that Google ADK is installed
docker run --rm obol-adk:test python -c "import google.adk; print('Google ADK imported successfully')"
# Test that main.py exists
docker run --rm obol-adk:test ls -la /app/main.py
integration-test:
runs-on: ubuntu-latest
needs: [test-mcp-filesystem-pull, test-foundry-mcp, test-obol-mcp, test-obol-adk]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Pull official MCP and build custom images
run: |
# Pull official MCP filesystem
docker pull mcp/filesystem &
# Build custom images in parallel
docker build -f obol-adk/dockerfiles/Dockerfile.foundry -t foundry-mcp:test obol-adk/dockerfiles &
docker build -f obol-adk/obol-agent-docker/Dockerfile -t obol-mcp:test obol-adk/obol-agent-docker &
docker build -f obol-adk/Dockerfile -t obol-adk:test obol-adk &
wait
- name: Verify all images
run: |
echo "=== Available Docker Images ==="
docker images | grep -E "(mcp/filesystem|foundry-mcp|obol-mcp|obol-adk)" | grep -E "(latest|test)"
echo "=== Image Sizes ==="
docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" | grep -E "(mcp/filesystem|test)"
- name: Test official MCP filesystem connection
run: |
# Test that official MCP filesystem can be run
echo "Testing official MCP filesystem server"
docker run --rm mcp/filesystem --help || echo "Filesystem MCP server available"
- name: Clean up test images
if: always()
run: |
docker image rm -f foundry-mcp:test obol-mcp:test obol-adk:test || true