You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
763 B
26 lines
763 B
import os
|
|
|
|
try:
|
|
import yaml
|
|
|
|
_HAS_YAML = True
|
|
except Exception:
|
|
_HAS_YAML = False
|
|
|
|
|
|
def test_mindmodel_workflow_exists_and_parses():
|
|
path = os.path.join(".github", "workflows", "mindmodel-validation.yml")
|
|
assert os.path.exists(path), f"Workflow file {path} does not exist"
|
|
|
|
# Minimal parse: if PyYAML is available, try safe_load; otherwise do a token check
|
|
with open(path, "r", encoding="utf-8") as f:
|
|
content = f.read()
|
|
|
|
if _HAS_YAML:
|
|
data = yaml.safe_load(content)
|
|
assert data is not None and isinstance(data, dict)
|
|
assert "on" in data or "name" in data
|
|
else:
|
|
# fall back to simple checks to avoid introducing new deps
|
|
assert "name:" in content
|
|
assert "on:" in content
|
|
|