From 22c9765b71f0a8d76a64e983800ebda6b2d71b5a Mon Sep 17 00:00:00 2001 From: Krishi Attri Date: Sat, 25 Jul 2026 00:33:51 +0000 Subject: [PATCH] fix: make clean package builds reproducible --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ pyproject.toml | 6 ++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1ff26bf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +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@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install package and test dependencies + run: | + python -m pip install --upgrade pip + pip install -e ".[test]" + - name: Run CPU unit tests + run: python -m pytest -q + - name: Build wheel from clean metadata + run: python -m pip wheel . --no-deps --wheel-dir dist diff --git a/pyproject.toml b/pyproject.toml index 75e28de..de0edd9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,9 @@ requires-python = ">=3.9" dependencies = ["hicache-pp>=1.1.0"] classifiers = ["Development Status :: 5 - Production/Stable"] +[project.optional-dependencies] +test = ["pytest>=8", "numpy>=1.24", "torch>=2.1"] + [project.urls] Repository = "https://github.com/Archerkattri/ComfyUI-HiCache" BugTracker = "https://github.com/Archerkattri/ComfyUI-HiCache/issues" @@ -24,3 +27,6 @@ Icon = "https://raw.githubusercontent.com/Archerkattri/ComfyUI-HiCache/main/icon [tool.pytest.ini_options] addopts = "--import-mode=importlib" testpaths = ["tests"] + +[tool.setuptools] +py-modules = ["hicache_patch", "nodes"]