Simplify: extract node validation helper, cache venv search, DRY CI s… #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: bash script/ci-start-server /tmp/venv/bin/python | |
| - 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: bash script/ci-start-server | |
| - 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: bash script/ci-start-server | |
| - 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 |