File tree Expand file tree Collapse file tree 2 files changed +63
-1
lines changed
Expand file tree Collapse file tree 2 files changed +63
-1
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : [push, pull_request]
4+
5+ # Automatically cancel previous runs of this workflow on the same branch
6+ concurrency :
7+ group : ${{ github.workflow }}-${{ github.ref }}
8+ cancel-in-progress : true
9+
10+ jobs :
11+ linux :
12+ # Skip building pull requests from the same repository
13+ if : ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
14+ runs-on : ubuntu-latest
15+ permissions :
16+ id-token : write
17+ contents : read
18+ env :
19+ PYTHONUNBUFFERED : 1
20+ steps :
21+ - name : Checkout
22+ uses : actions/checkout@v5
23+
24+ - name : Update pyproject.toml version
25+ if : ${{ startsWith(github.ref, 'refs/tags/') }}
26+ shell : bash
27+ run : |
28+ # Extract version from tag (strip 'v' prefix if present)
29+ VERSION=${GITHUB_REF#refs/tags/}
30+ VERSION=${VERSION#v}
31+ echo "Extracted version: $VERSION"
32+
33+ # Update version in pyproject.toml (works on both GNU and BSD sed)
34+ sed -i.bak "s/^version = .*/version = \"$VERSION\"/" pyproject.toml
35+ rm pyproject.toml.bak
36+
37+ - name : Install uv
38+ uses : astral-sh/setup-uv@v6
39+ with :
40+ version : " 0.9.3"
41+
42+ - name : Create venv
43+ run : uv sync
44+
45+ - name : Type check
46+ run : uvx ty check
47+
48+ - name : Test JSON-RPC
49+ run : uv run coverage run --data-file=.coverage.jsonrpc tests/jsonrpc_test.py
50+
51+ - name : Test MCP
52+ run : uv run coverage run --data-file=.coverage.mcp tests/mcp_test.py
53+
54+ - name : Generate coverage report
55+ run : |
56+ uv run coverage combine
57+ uv run coverage report
58+
59+ - name : Publish
60+ if : ${{ startsWith(github.ref, 'refs/tags/') }}
61+ run : uv build && uv publish
Original file line number Diff line number Diff line change @@ -216,6 +216,7 @@ async def test_serve():
216216 bufsize = 1 ,
217217 )
218218 try :
219+ await asyncio .sleep (0.5 ) # Wait for server to start
219220 await test_sse (address )
220221 await test_streamablehttp (address )
221222 finally :
@@ -225,8 +226,8 @@ async def test_serve():
225226 pass
226227
227228async def main ():
228- await test_stdio ()
229229 await test_serve ()
230+ await test_stdio ()
230231
231232if __name__ == "__main__" :
232233 import os
You can’t perform that action at this time.
0 commit comments