* ci: declare minimal GITHUB_TOKEN permissions (contents: read) Clears the CodeQL actions/missing-workflow-permissions alert. These CI jobs only check out code and run tests, so contents: read is sufficient. * chore: refresh packaging and retain node integration smoke * test: retain budget integration in node cleanup * style: clean budget integration test EOF --------- Co-authored-by: Muse Code <muse@example.com>
66 lines
2.2 KiB
YAML
66 lines
2.2 KiB
YAML
name: CI
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-python@v7
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install package and verification dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -e ".[test]"
|
|
pip install "ruff>=0.16"
|
|
pip install --force-reinstall --no-deps "hicache-pp @ git+https://github.com/Archerkattri/hicache-plus-plus@master"
|
|
- name: Compile Python sources
|
|
run: python -m compileall -q .
|
|
- name: Run registry security style checks
|
|
run: python -m ruff check --select E702 .
|
|
- name: Smoke-test ComfyUI node-pack registration and schema
|
|
run: |
|
|
python - <<'PY'
|
|
import importlib.util
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
pack_dir = Path.cwd()
|
|
spec = importlib.util.spec_from_file_location(
|
|
"comfyui_hicache_smoke",
|
|
pack_dir / "__init__.py",
|
|
submodule_search_locations=[str(pack_dir)],
|
|
)
|
|
if spec is None or spec.loader is None:
|
|
raise RuntimeError("could not load the node pack")
|
|
pack = importlib.util.module_from_spec(spec)
|
|
sys.modules[spec.name] = pack
|
|
spec.loader.exec_module(pack)
|
|
|
|
assert "HiCacheAccelerate" in pack.NODE_CLASS_MAPPINGS
|
|
assert "HiCacheAccelerate" in pack.NODE_DISPLAY_NAME_MAPPINGS
|
|
node = pack.NODE_CLASS_MAPPINGS["HiCacheAccelerate"]
|
|
schema = node.INPUT_TYPES()
|
|
required = schema["required"]
|
|
assert required["pipeline"][0] == "HY3DMODEL"
|
|
assert set(required["method"][0]) == {"hermite", "dmd", "auto"}
|
|
assert node.RETURN_TYPES == ("HY3DMODEL",)
|
|
PY
|
|
- name: Run budget-bridge integration check
|
|
run: python -m pytest -q tests/test_budget_bridge.py
|
|
- name: Build wheel from clean metadata
|
|
run: python -m pip wheel . --no-deps --wheel-dir dist
|