Repository navigation
fix: scope rules by file type and run CI checks from validate_plugin.py #55
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: Validate | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate-json: | |
| name: Validate JSON and MCP data files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Check manifest, mcp.json, and data file schemas | |
| run: python3 .github/scripts/validate_plugin.py manifest data | |
| validate-skills: | |
| name: Validate skill files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Check SKILL.md frontmatter | |
| run: python3 .github/scripts/validate_plugin.py skills | |
| validate-rules: | |
| name: Validate rule files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Check .mdc frontmatter and scoping | |
| run: python3 .github/scripts/validate_plugin.py rules | |
| validate-content: | |
| name: Validate content quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Check dashes, C# 9 compatibility, credentials, and snippets | |
| run: python3 .github/scripts/validate_plugin.py content | |
| validate-templates: | |
| name: Validate templates | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Check template structure | |
| run: python3 .github/scripts/validate_plugin.py templates | |
| validate-counts: | |
| name: Validate content counts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Check counts in README and docs match the repo | |
| run: python3 .github/scripts/validate_plugin.py counts | |
| validate-python: | |
| name: Validate MCP server (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: pip install -r mcp-server/requirements-dev.txt | |
| - name: Lint Python (syntax errors, undefined names, unused imports) | |
| run: ruff check mcp-server .github/scripts | |
| - name: Run MCP server tests | |
| run: python -m pytest mcp-server/tests -v | |
| compile-csharp: | |
| name: Compile C# against Unity 6 | |
| runs-on: ubuntu-latest | |
| env: | |
| # Bump together when moving to a newer Unity 6 LTS or Input System release | |
| UNITY_VERSION: 6000.0.84f1 | |
| INPUTSYSTEM_VERSION: 1.20.1 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: "8.0.x" | |
| - name: Cache Unity reference assemblies | |
| id: unity-refs | |
| uses: actions/cache@v6 | |
| with: | |
| path: .unity-refs | |
| key: unity-refs-${{ env.UNITY_VERSION }}-inputsystem-${{ env.INPUTSYSTEM_VERSION }} | |
| - name: Download Unity reference assemblies | |
| if: steps.unity-refs.outputs.cache-hit != 'true' | |
| run: >- | |
| python .github/scripts/fetch_unity_refs.py | |
| --unity-version "$UNITY_VERSION" | |
| --inputsystem-version "$INPUTSYSTEM_VERSION" | |
| --out .unity-refs | |
| - name: Compile snippets and templates (player and editor passes) | |
| run: >- | |
| python .github/scripts/compile_csharp.py | |
| --unity .unity-refs/Editor/Data | |
| --inputsystem .unity-refs/inputsystem/package |