- Add .github/workflows/test.yml: runs the pytest suite on push/PR across Python 3.10/3.11/3.12. comfy_api is mocked in conftest.py, so no ComfyUI install is required. - execute(): pass a zero-dimension (malformed/empty) input tensor through unchanged instead of crashing the resizer. - execute(): warn when "Prioritize Min Resolution" forces a large upscale (>4x) on an extreme aspect ratio, pointing at the strict mode as the size-capping alternative. - Add regression tests for the zero-dim passthrough and the extreme-upscale warning. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SqaVwWKNn9bsmmhUkJXhZ2
30 lines
805 B
YAML
30 lines
805 B
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
pytest:
|
|
name: pytest (Python ${{ matrix.python-version }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install test dependencies
|
|
# comfy_api is mocked in conftest.py, so a full ComfyUI install isn't needed.
|
|
# numpy silences torch's "Failed to initialize NumPy" import warning.
|
|
run: python -m pip install --upgrade pip pytest torch numpy
|
|
- name: Run tests
|
|
run: python -m pytest -q
|