* fix(tests): canonicalize expected writer filepath on Windows build_pipeline_outputs canonicalizes output paths to forward slashes on every platform, but the execution-map writer test built its expectation from str(tmp_path), which yields backslashes on Windows — failing there while ubuntu CI stayed green. Normalize the expected prefix the same way test_easy_ai_pipeline.py already does. No-op on POSIX. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * ci: run pytest job on a windows-latest matrix lane The suite is now Windows-clean (previous commit), but only ubuntu ran in CI - the path-separator regression this PR fixes was invisible until a local Windows run. Add windows-latest to the pytest job so that class of break gates PRs. fail-fast off so a Windows-only failure still reports alongside the green ubuntu lane. Safe rename: Protect-main requires only "Lint & Smoke" and "Security Gate", so Pytest -> "Pytest (os)" breaks no required check. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
102 lines
2.8 KiB
YAML
102 lines
2.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint-smoke:
|
|
name: Lint & Smoke
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: Install lint tools
|
|
run: pip install ruff==0.6.9
|
|
|
|
- name: Ruff check
|
|
run: ruff check .
|
|
|
|
- name: Compile all (syntax smoke)
|
|
run: python -m compileall -q -x '(\.venv|forks|upscaler_FIX/github_repos|nuke_CAM_exporter)' .
|
|
|
|
- name: Run JS smoke tests
|
|
run: node tests/js/test_ai_pipeline_preview.mjs
|
|
|
|
security-gate:
|
|
name: Security Gate
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install bandit
|
|
run: pip install bandit==1.7.10
|
|
|
|
- name: Bandit scan
|
|
run: bandit -r . -x ./.venv,./forks,./upscaler_FIX,./nuke_CAM_exporter -ll
|
|
|
|
preflight:
|
|
name: Pre-flight Release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Run pre-flight (static + dispatch + workflow fixtures)
|
|
# manager-meta is skipped on PRs because the upstream node-map drift
|
|
# is owned by an external repo (ltdrdata/ComfyUI-Manager) and is
|
|
# tracked separately via issue #44. Re-enable by removing --skip
|
|
# once that issue is resolved upstream.
|
|
run: python tools/preflight_release.py --skip manager-meta -v
|
|
|
|
pytest:
|
|
name: Pytest
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
# Keep both lanes reporting even when one fails — a Windows-only
|
|
# failure with a green ubuntu lane is exactly the signal this
|
|
# matrix exists to surface.
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install test deps
|
|
# Install the deps directly — this project is a ComfyUI custom node,
|
|
# not a pip-installable package, so ``pip install .[test]`` tries to
|
|
# build a wheel and fails on flat-layout discovery of ``web/`` and
|
|
# ``forks/``. The pyproject's ``[project.optional-dependencies]
|
|
# test`` block is the spec; CI mirrors it explicitly. ``aiohttp`` is
|
|
# a runtime dep of ``koolook_routes`` and must be importable even
|
|
# when only a pure helper is under test. ``Pillow`` backs the
|
|
# audio-card metadata tests.
|
|
run: pip install "pytest>=8" "aiohttp>=3.9" "Pillow>=10"
|
|
|
|
- name: Run pytest
|
|
run: pytest -q
|