-
Notifications
You must be signed in to change notification settings - Fork 0
199 lines (187 loc) · 6.61 KB
/
Copy pathci.yml
File metadata and controls
199 lines (187 loc) · 6.61 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
name: ci
on:
push:
pull_request:
permissions:
contents: read
jobs:
go:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.25.x", "1.26.x"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
cache: true
- name: Check formatting
run: test -z "$(gofmt -l .)"
- name: Vet
run: go vet ./...
- name: Test with race detector
run: go test -race ./...
- name: Verify HTTP contracts
run: go test ./controlplane ./agentapi ./host -run 'Contract|OpenAPI|Fixture'
console:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "24"
package-manager-cache: false
- name: Test console
run: node --test consoleui/static/app.test.mjs
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.26.x"
cache: true
- name: Build command binaries
env:
CGO_ENABLED: "0"
run: |
go build -trimpath ./cmd/rin
go build -trimpath ./cmd/rin-control
go build -trimpath ./cmd/rin-mcp
mcp-conformance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.26.x"
cache: true
- uses: actions/setup-node@v6
with:
node-version: "20"
package-manager-cache: false
- name: Build Control Daemon and thin MCP gateway
run: |
mkdir -p .cache/mcp-conformance/bin
CGO_ENABLED=0 go build -trimpath -o .cache/mcp-conformance/bin/rin-control ./cmd/rin-control
CGO_ENABLED=0 go build -trimpath -o .cache/mcp-conformance/bin/rin-mcp ./cmd/rin-mcp
- name: Run official MCP server scenarios
shell: bash
env:
RIN_CONTROL_ADDR: 127.0.0.1:17375
RIN_CONTROL_URL: http://127.0.0.1:17375
RIN_CONTROL_DATA_DIR: .cache/mcp-conformance/data
RIN_CONTROL_PRINCIPAL: conformance.client
RIN_CONTROL_SCOPES: actor.read
RIN_CONTROL_TOKEN: 0123456789abcdef0123456789abcdef
run: |
set -euo pipefail
.cache/mcp-conformance/bin/rin-control >.cache/mcp-conformance/control.log 2>&1 &
control_pid=$!
for attempt in $(seq 1 40); do
if curl --fail --silent --header "Authorization: Bearer ${RIN_CONTROL_TOKEN}" "${RIN_CONTROL_URL}/control/v2/info" >/dev/null; then break; fi
sleep 0.25
done
curl --fail --silent --header "Authorization: Bearer ${RIN_CONTROL_TOKEN}" "${RIN_CONTROL_URL}/control/v2/info" >/dev/null
.cache/mcp-conformance/bin/rin-mcp -conformance-addr 127.0.0.1:17380 >.cache/mcp-conformance/mcp.log 2>&1 &
mcp_pid=$!
trap 'kill "$mcp_pid" "$control_pid" 2>/dev/null || true' EXIT
for attempt in $(seq 1 40); do
if curl --fail --silent http://127.0.0.1:17380/health >/dev/null; then break; fi
sleep 0.25
done
curl --fail --silent http://127.0.0.1:17380/health >/dev/null
for scenario in server-initialize logging-set-level ping tools-list resources-list prompts-list dns-rebinding-protection; do
npx --yes @modelcontextprotocol/conformance@0.1.11 server --url http://127.0.0.1:17380/mcp --scenario "$scenario" --output-dir .cache/mcp-conformance/results
done
sdk-python:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.9", "3.x"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- run: python -m unittest discover -s sdk/python/tests -p 'test_*.py'
sdk-javascript:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["18", "24"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
package-manager-cache: false
- working-directory: sdk/javascript
run: node --test
sdk-java:
runs-on: ubuntu-latest
strategy:
matrix:
java: ["17", "25"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Compile and test Java SDK
run: |
mkdir -p .cache/java-sdk
find sdk/java/src/main/java sdk/java/test -name '*.java' > .cache/java-sdk/sources.txt
javac --add-modules jdk.httpserver -d .cache/java-sdk @.cache/java-sdk/sources.txt
java --add-modules jdk.httpserver -cp .cache/java-sdk io.github.sunrioa.rin.RinSdkTest
sdk-csharp:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dotnet: "8.0.x"
framework: "net8.0"
- dotnet: "10.0.x"
framework: "net10.0"
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Build and test C# SDK
run: |
dotnet build sdk/csharp/Rin.Client.Tests/Rin.Client.Tests.csproj -p:RinTargetFramework=${{ matrix.framework }} --nologo
dotnet exec sdk/csharp/Rin.Client.Tests/bin/Debug/${{ matrix.framework }}/Rin.Client.Tests.dll
- name: Build source-first compatibility target
if: matrix.framework == 'net8.0'
run: dotnet build sdk/csharp/Rin.Client/Rin.Client.csproj -p:RinTargetFramework=netstandard2.0 --nologo
sdk-lua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Lua runtimes
run: |
sudo apt-get update
sudo apt-get install -y lua5.1 lua5.4
- run: lua5.1 sdk/lua/test_client.lua
- run: lua5.4 sdk/lua/test_client.lua
terminal-story:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.26.x"
cache: true
- name: Test V2 reference adapters
run: go test ./examples/adapters/grid ./examples/adapters/story ./examples/terminal-story
- name: Run terminal story smoke test
run: go run ./examples/terminal-story --line "The light feels familiar." --topic festival --task prepare-exhibit --json