Files
wildminder-ComfyUI-Chatterbox/.github/workflows/tests.yml
T
WildAi 5d4770ea70 docs: readme, changelog, ci; ignore .dev
.dev is a local-only symlink; nothing may reference it.
Workflow examples renamed per registry convention.
2026-10-06 18:36:09 +03:00

67 lines
2.4 KiB
YAML

name: Tests
# The publish-only workflow next to this one is untouched.
#
# The point of this job is that it is nearly empty. `conftest.py` mocks the
# whole vendored Chatterbox model stack at collection time, so the suite runs
# on a clean runner with:
#
# * no resemble-perth (the watermarking import is defensive)
# * no diffusers (not a dependency any more)
# * no s3tokenizer (vendored imports are mocked)
# * no conformer (vendored imports are mocked)
#
# That is the Phase 0 mock paying for itself: if a future change ever makes the
# suite depend on one of those, this workflow fails. So do not "fix" it by
# adding them to the install list below -- that would delete the signal.
on:
workflow_dispatch:
push:
branches: [main, master]
pull_request:
permissions:
contents: read
jobs:
pytest:
name: pytest (mocked vendor, real ComfyUI core)
runs-on: ubuntu-latest
steps:
- name: Check out the node package
uses: actions/checkout@v4
# A real ComfyUI checkout, laid out as a sibling of this repository so
# conftest's own resolution logic finds it even without COMFYUI_ROOT.
# `comfy` and `folder_paths` are imported FOR REAL: these are ComfyUI
# nodes, and testing them against a fake core would test nothing.
- name: Check out ComfyUI core
uses: actions/checkout@v4
with:
repository: comfyanonymous/ComfyUI
path: ComfyUI
# Only what the suite actually touches from the host environment, which
# a real user already has. Deliberately not this repository's own
# requirements.txt -- see the header.
- name: Install the test runner
run: |
python -m pip install --upgrade pip
python -m pip install pytest setuptools
python -m pip install --index-url https://download.pytorch.org/whl/cpu torch
python -m pip install numpy soundfile huggingface_hub
- name: Report the resolved environment
run: |
python --version
python -c "import torch; print('torch', torch.__version__)"
python -m pytest --version
- name: Run the suite
env:
COMFYUI_ROOT: ${{ github.workspace }}/ComfyUI
# -rs so every skip prints its reason: a passing suite whose skips are
# unexplained is not a green suite.
run: python -m pytest tests/ -q -rs