-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (47 loc) · 1.78 KB
/
ftl-test.yml
File metadata and controls
60 lines (47 loc) · 1.78 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
name: FTL Test
on:
push:
branches: [ fix-smoke-tests ]
env:
CARGO_TERM_COLOR: always
jobs:
ftl-test:
name: FTL Integration Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup FTL CLI with Dependencies
uses: fastertools/actions/ftl-setup@b6389f6053cc38f948a855d47905d8088b672852
- name: Start FTL Server
uses: fastertools/actions/ftl-server-up@b6389f6053cc38f948a855d47905d8088b672852
with:
port: 3000
timeout: 30
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip1
- name: Build WASM
run: ftl build
# - uses: fastertools/actions/actions/ftl-eng-deploy@21403b8e36d45ab02cbe5fe8c0fc9951f56cb9bc
# env:
# FTL_M2M_APP_CLIENT_ID: ${{ secrets.FTL_M2M_APP_CLIENT_ID }}
# FTL_M2M_APP_CLIENT_SECRET: ${{ secrets.FTL_M2M_APP_CLIENT_SECRET }}
- name: Test MCP endpoint
run: |
HEALTH_URL="http://localhost:3000/mcp"
mcp_request='{"jsonrpc":"2.0","method":"ping","id":1}'
mcp_response=$(curl -w "HTTP_STATUS:%{http_code}" -s --connect-timeout 5 --max-time 10 \
-H "Content-Type: application/json" \
-X POST \
-d "$mcp_request" \
"$HEALTH_URL" 2>&1)
echo $mcp_response
http_status=$(echo "$mcp_response" | grep -o "HTTP_STATUS:[0-9]*" | cut -d: -f2)
if [[ "$http_status" == "200" ]]; then
echo "✅ MCP endpoint responding with HTTP 200"
else
echo "❌ MCP endpoint failed with status: $http_status"
echo "Response: $mcp_response"
exit 1
fi