Repository navigation
58 lines (44 loc) · 1.73 KB
/
Copy pathci.yml
File metadata and controls
58 lines (44 loc) · 1.73 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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run build --workspaces --if-present
- name: Unit Tests
run: npm test --workspaces --if-present
- name: Adversarial Tests
run: |
# Specifically run the structuring detector and verify-chain tests
# Assuming test files are under packages/proxy/src/**/*.test.ts
node --test --import tsx packages/proxy/src/structuring/detector.test.ts
# We don't have a chain.test.ts yet but adding placeholder for adversarial suite
- name: Build Docker Image
run: docker build -t structura-proxy .
- name: Run and Test Docker Container
run: |
# 1. Start in background to test API
docker run --name proxy -id -p 4000:4000 structura-proxy --key mock --secret mock --toolsets payments stdio
# Wait for boot
sleep 5
# Check API
curl -f http://localhost:4000/stats || (docker logs proxy && exit 1)
# Clean up background container
docker rm -f proxy
# 2. Test stdio MCP interaction directly via pipe
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | docker run -i structura-proxy --key mock --secret mock --toolsets payments stdio > response.txt
cat response.txt
grep -q 'fetch_all_payments' response.txt