Remove legacy MCP/ folder and update all references #9
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-checks: | |
| name: Python Lint & Import Check | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff | |
| - name: Lint unrealmcp/ (pip package) | |
| run: | | |
| ruff check unrealmcp/ --select=E,F,W --ignore=E501,F401 | |
| - name: Install unrealmcp package | |
| run: | | |
| pip install -e . | |
| - name: Verify unrealmcp imports and version | |
| run: | | |
| python -c " | |
| import unrealmcp | |
| print(f'unrealmcp v{unrealmcp.__version__}') | |
| assert unrealmcp.__version__ == '1.0.0', f'Unexpected version: {unrealmcp.__version__}' | |
| " | |
| - name: Verify all tool modules import via package | |
| run: | | |
| python -c " | |
| import importlib, os | |
| # Import the bridge | |
| from unrealmcp._bridge import mcp | |
| print(f' Bridge OK — server name: {mcp.name}') | |
| # Import each tool module | |
| tools_dir = os.path.join(os.path.dirname(os.path.abspath(os.path.dirname(__import__('unrealmcp').__file__))), 'unrealmcp', 'tools') | |
| count = 0 | |
| for f in sorted(os.listdir(tools_dir)): | |
| if f.endswith('.py') and f != '__init__.py': | |
| mod_name = f'unrealmcp.tools.{f[:-3]}' | |
| print(f' Importing {mod_name}...', end=' ') | |
| importlib.import_module(mod_name) | |
| print('OK') | |
| count += 1 | |
| print(f'\nAll {count} tool modules imported successfully.') | |
| " | |
| - name: Verify unrealmcp entry point exists | |
| run: | | |
| which unrealmcp | |
| unrealmcp --help || true | |
| - name: Verify plugin descriptor is valid JSON | |
| run: | | |
| python -c " | |
| import json | |
| with open('UnrealMCP.uplugin') as f: | |
| data = json.load(f) | |
| assert 'Modules' in data, 'Missing Modules key' | |
| assert 'FriendlyName' in data, 'Missing FriendlyName key' | |
| print('Plugin descriptor is valid.') | |
| " | |
| - name: Verify pyproject.toml metadata | |
| run: | | |
| python -c " | |
| import sys | |
| if sys.version_info >= (3, 11): | |
| import tomllib | |
| else: | |
| import pip._vendor.tomli as tomllib | |
| with open('pyproject.toml', 'rb') as f: | |
| data = tomllib.load(f) | |
| project = data['project'] | |
| assert project['name'] == 'unrealmcp', f'Wrong name: {project[\"name\"]}' | |
| assert 'fastmcp' in str(project['dependencies']), 'Missing fastmcp dependency' | |
| scripts = project.get('scripts', {}) | |
| assert 'unrealmcp' in scripts, 'Missing unrealmcp entry point' | |
| print(f'pyproject.toml valid: {project[\"name\"]} v{project[\"version\"]}') | |
| " |