Skip to content

Fix Windows source root marker path #23

Fix Windows source root marker path

Fix Windows source root marker path #23

name: Integration Tests
on:
push:
# Release tags point at the already-tested master commit. Keeping this
# workflow branch-only avoids duplicate master+tag runs for the same SHA.
branches:
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
offline-ci:
name: Offline Checks (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Run Python Unit Tests
shell: bash
run: |
PYTHONPATH=templates python -m unittest discover -s tests -v
- name: Smoke run.cmd Launcher
if: runner.os == 'Windows'
shell: cmd
run: |
call templates\run.cmd --help 1> run_cmd_help.txt 2>&1
if errorlevel 1 exit /b 1
findstr /C:"usage:" run_cmd_help.txt
- name: Smoke refresh run.cmd Launcher
if: runner.os == 'Windows'
shell: cmd
run: |
set "CODEX_HOME=%RUNNER_TEMP%\codex-home"
set "CODEX_TOOLS_HOME=%RUNNER_TEMP%\codex-tools"
set "CLAUDE_TOOLS_HOME=%RUNNER_TEMP%\claude-tools"
set "CLAUDE_CONFIG_PATH=%RUNNER_TEMP%\claude.json"
set "XUUNITY_LIGHT_UNITY_MCP_NEUTRAL_INSTALL_DIR=%RUNNER_TEMP%\neutral-xuunity-mcp"
call run_installed_or_refresh_xuunity_mcp.cmd --print-run 1> refresh_cmd_run.txt 2>&1
if errorlevel 1 exit /b 1
type refresh_cmd_run.txt
findstr /C:"run.cmd" refresh_cmd_run.txt
- name: Smoke run.ps1 Launcher
if: runner.os == 'Windows'
shell: pwsh
run: |
$out = & ./templates/run.ps1 --help 2>&1
if ($LASTEXITCODE -ne 0) { throw "run.ps1 --help exited with $LASTEXITCODE" }
$text = ($out | Out-String)
if ($text -notmatch 'usage:') { throw "run.ps1 --help output missing usage text" }
Write-Host "run.ps1 --help OK"
- name: Scaffold Test Unity Project
shell: bash
run: |
mkdir -p TestProject/Assets
mkdir -p TestProject/ProjectSettings
mkdir -p TestProject/Packages
echo "m_EditorVersion: 6000.3.2f1" > TestProject/ProjectSettings/ProjectVersion.txt
echo '{"dependencies": {}}' > TestProject/Packages/manifest.json
- name: Run MCP setup-plan
shell: bash
run: |
python templates/server.py setup-plan --project-root TestProject > plan.json
python -m json.tool plan.json
- name: Run MCP setup-apply
shell: bash
run: |
python templates/server.py setup-apply --plan-file plan.json --project-root TestProject --yes
- name: Run MCP validate-setup
shell: bash
run: |
python templates/server.py validate-setup --project-root TestProject
- name: Verify package is registered in manifest
shell: python
run: |
import json
import sys
with open("TestProject/Packages/manifest.json", "r") as f:
manifest = json.load(f)
dependencies = manifest.get("dependencies", {})
if "com.xuunity.light-mcp" not in dependencies:
print("ERROR: com.xuunity.light-mcp is missing from package manifest!")
sys.exit(1)
print("Verification successful: com.xuunity.light-mcp is present.")