feat(mcp): add HugeGraph MCP V1 tools and harden guarded writes #249
Workflow file for this run
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: "Ruff Code Quality" | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| - "release-*" | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Cache dependencies | |
| id: cache-deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| ~/.cache/pip | |
| key: ${{ runner.os }}-uv-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-uv-${{ matrix.python-version }}- | |
| - name: Install dev dependencies | |
| run: | | |
| uv sync --extra dev | |
| - name: Check code formatting with Ruff | |
| run: | | |
| uv run ruff format --check . | |
| - name: Lint code with Ruff | |
| run: | | |
| uv run ruff check . | |
| ty-check: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11"] # hugegraph-llm requires <3.12 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Cache dependencies | |
| id: cache-deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| ~/.cache/pip | |
| key: ${{ runner.os }}-uv-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-uv-${{ matrix.python-version }}- | |
| - name: Install dev + runtime extras | |
| run: | | |
| uv sync --extra dev --extra llm --extra python-client | |
| - name: Type check with ty (non-blocking) | |
| run: uv run ty check hugegraph-llm/src hugegraph-python-client/src | |
| continue-on-error: true | |
| # TODO: extend scope to hugegraph-ml once heavy optional deps (DGL, PyTorch) are handled | |
| # TODO: add graph-mcp once the module is introduced |