Bugs found reading the pack end to end. V3 mode registered five of the seven nodes: Save Image (Civitai) and Prompt + LoRAs had no schema, so a workflow using either failed to open with WARPPIPE_ENABLE_V3=1 and nothing said why. Both registration paths are now built from one NODE_DEFINITIONS table, a missing V3 schema is reported at startup, and a test asserts the two paths agree. The built wheel shipped no JavaScript at all - package-data listed only web/docs/*.md - so a registry install had a frontend directory holding documentation and nothing else. A test now reads pyproject.toml and checks every file under web/ is matched by a glob. Also fixed: - ruff format failed on two files, so CI was red on every push - the nearest-model tie-break compared whole tuples, breaking ties on the filename rather than on the order the graph listed them - SAFE_SAMPLERS and SAFE_SCHEDULERS referenced ComfyUI's own lists rather than copying them, so anything another pack appended later walked through coerce_scheduler untouched - the hash and thumbnail caches wrote straight to their final paths, leaving a truncated file behind if anything interrupted them - the Prompt + LoRAs node left a 100ms timer, a MutationObserver and its strip running after the node was removed - model names and base models from downloaded sidecars were written into the browser's rows as markup without escaping - a branch in the save node preferring "LoRAs recorded in the warp" could never run, because nothing ever wrote them there - indexing the library read every .civitai.info twice - the two views each held their own copy of the index and fetched it separately The frontend had no automated checks at all, which is how two unused arguments and an unescaped innerHTML survived. eslint and prettier now run over web/ in their own CI job, with the lockfile committed for the same reason the Python tools are pinned. Five regression tests, each checked against the unfixed code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.9", "3.13"]
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: pip
|
|
- name: Install test tools
|
|
# Pinned deliberately: an unpinned tool turns any upstream release into
|
|
# a red build with no code change. Versions must satisfy the oldest
|
|
# entry in the matrix (3.9), not just the newest.
|
|
run: python -m pip install "build==1.4.4" "pytest==8.4.2" "ruff==0.16.5"
|
|
- name: Lint
|
|
run: python -m ruff check . --exclude .agents --exclude .claude
|
|
- name: Check formatting
|
|
run: python -m ruff format --check . --exclude .agents --exclude .claude
|
|
- name: Run tests
|
|
run: python -m pytest -q
|
|
- name: Build package
|
|
run: python -m build
|
|
|
|
web:
|
|
# The frontend is a third of this pack by volume and had no checks at all,
|
|
# which is how two unused arguments and an unescaped innerHTML survived.
|
|
# Its own job, because it shares nothing with the Python matrix.
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: npm
|
|
# ci, not install: the lockfile is committed so a red build means the
|
|
# code changed, the same reason the Python tools above are pinned.
|
|
- name: Install web tooling
|
|
run: npm ci
|
|
- name: Lint
|
|
run: npm run lint
|
|
- name: Check formatting
|
|
run: npm run format:check
|