39 lines
1.6 KiB
Python
39 lines
1.6 KiB
Python
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
REPO_ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def test_registry_metadata_and_workflow_files_exist():
|
|
pyproject_path = REPO_ROOT / "pyproject.toml"
|
|
workflow_path = REPO_ROOT / ".github" / "workflows" / "publish_action.yml"
|
|
license_path = REPO_ROOT / "LICENSE"
|
|
|
|
assert pyproject_path.exists(), f"Expected {pyproject_path} to exist"
|
|
assert workflow_path.exists(), f"Expected {workflow_path} to exist"
|
|
assert license_path.exists(), f"Expected {license_path} to exist"
|
|
|
|
pyproject_text = pyproject_path.read_text(encoding="utf-8")
|
|
workflow_text = workflow_path.read_text(encoding="utf-8")
|
|
license_text = license_path.read_text(encoding="utf-8")
|
|
|
|
assert "[project]" in pyproject_text
|
|
assert '[tool.comfy]' in pyproject_text
|
|
assert 'name = "wade-kieapi"' in pyproject_text
|
|
assert 'version = "0.1.4"' in pyproject_text
|
|
assert 'license = { file = "LICENSE" }' in pyproject_text
|
|
assert 'dynamic = ["dependencies"]' in pyproject_text
|
|
assert 'PublisherId = "wadesong"' in pyproject_text
|
|
assert 'DisplayName = "ComfyUI-KieAPI"' in pyproject_text
|
|
assert 'Repository = "https://github.com/Song367/ComfyUI-KieAPI"' in pyproject_text
|
|
assert '[tool.setuptools.dynamic]' in pyproject_text
|
|
assert 'dependencies = { file = ["requirements.txt"] }' in pyproject_text
|
|
|
|
assert "workflow_dispatch:" in workflow_text
|
|
assert "push:" not in workflow_text
|
|
assert "Comfy-Org/publish-node-action" in workflow_text
|
|
assert "REGISTRY_ACCESS_TOKEN" in workflow_text
|
|
assert "All rights reserved." in license_text
|