Skip to content

fix: remove save_asset call that triggered source control checkout di… #21

fix: remove save_asset call that triggered source control checkout di…

fix: remove save_asset call that triggered source control checkout di… #21

Workflow file for this run

name: CI — Syntax Check
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
syntax-check:
name: Python Syntax Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Check all Python files parse cleanly
run: |
python - <<'EOF'
import ast, sys, pathlib
errors = []
root = pathlib.Path(".")
files = list(root.glob("Content/Python/**/*.py")) + \
[root / "mcp_server.py", root / "client.py", root / "install.py"]
for f in files:
try:
ast.parse(f.read_text(encoding="utf-8"))
except SyntaxError as e:
errors.append(f"SYNTAX ERROR {f}: {e}")
if errors:
print("\n".join(errors))
sys.exit(1)
else:
print(f"✓ {len(files)} files — no syntax errors")
EOF
- name: Validate registry.json
run: |
python - <<'EOF'
import json, sys
with open("registry.json", encoding="utf-8") as f:
data = json.load(f)
base_fields = ["id", "name", "version", "author", "type", "description",
"category", "url", "min_toolbelt_version"]
community_fields = base_fields + ["download_url"]
errors = []
for plugin in data.get("plugins", []):
required_fields = community_fields if plugin.get("type") == "community" else base_fields
for field in required_fields:
if field not in plugin:
errors.append(f"Plugin '{plugin.get('id','?')}' missing field: {field}")
if errors:
print("\n".join(errors))
sys.exit(1)
else:
print(f"✓ registry.json — {len(data['plugins'])} plugins valid")
EOF