Skip to content

Fix plugin server start: use existing server instead of killing it #7

Fix plugin server start: use existing server instead of killing it

Fix plugin server start: use existing server instead of killing it #7

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
python-tests:
name: Python ${{ matrix.python-version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Run tests
run: pytest -v
- name: Lint
run: ruff check src/ tests/
godot-tests-linux:
name: Godot tests / Linux
runs-on: ubuntu-latest
container:
image: barichello/godot-ci:4.6.2
steps:
- uses: actions/checkout@v4
- name: Set up Python
run: |
apt-get update -qq && apt-get install -y -qq python3 python3-pip python3-venv curl > /dev/null
python3 -m venv /tmp/venv
/tmp/venv/bin/pip install -e ".[dev]" > /dev/null
- name: Start MCP server
run: |
/tmp/venv/bin/python -m godot_ai --transport streamable-http --port 8000 &
for i in $(seq 1 30); do
curl -s -o /dev/null http://127.0.0.1:8000/mcp -X POST \
-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"ci","version":"1.0"}}}' && echo "Server ready" && break
sleep 1
done
- name: Start Godot editor (headless)
run: |
timeout 30 godot --headless --path test_project --import || true
timeout 120 godot --headless --path test_project --editor &
- name: Run handler tests
run: bash script/ci-godot-tests
godot-tests-macos:
name: Godot tests / macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: chickensoft-games/setup-godot@v2
with:
version: 4.6.2
use-dotnet: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Start MCP server
run: |
python -m godot_ai --transport streamable-http --port 8000 &
for i in $(seq 1 30); do
curl -s -o /dev/null http://127.0.0.1:8000/mcp -X POST \
-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"ci","version":"1.0"}}}' && echo "Server ready" && break
sleep 1
done
- name: Start Godot editor (headless)
run: |
godot --headless --path test_project --import || true
godot --headless --path test_project --editor &
- name: Run handler tests
run: bash script/ci-godot-tests
godot-tests-windows:
name: Godot tests / Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: chickensoft-games/setup-godot@v2
with:
version: 4.6.2
use-dotnet: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Start MCP server
shell: bash
run: |
python -m godot_ai --transport streamable-http --port 8000 &
for i in $(seq 1 30); do
curl -s -o /dev/null http://127.0.0.1:8000/mcp -X POST \
-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"ci","version":"1.0"}}}' && echo "Server ready" && break
sleep 1
done
- name: Start Godot editor (headless)
shell: bash
run: |
godot --headless --path test_project --import || true
godot --headless --path test_project --editor &
- name: Run handler tests
shell: bash
run: bash script/ci-godot-tests