Files
ausboss-ComfyUI-AusBoss/.github/workflows/validate_action.yml
T
ausboss 0f689e3bea Test that file reads stay inside ComfyUI's folders
Widget values reach the loaders through ComfyUI's /prompt route, and
resolve_input_path and local_preview_allowed are what keep those reads
inside ComfyUI's input, output and temp folders. No test covered them:
removing the outside-the-input-folder check, the network-path check or
local path mode's network check passed every test.

tests/test_media_paths.py covers climbing out with "..", absolute paths,
links pointing outside, "[output]" names, network paths refused before
the path is touched (even when a ComfyUI folder itself sits on the
share), and local path mode. The guards need neither torch nor PyAV, so
the media module's heavy imports are stubbed when missing and the file
runs in CI. Each guard's removal fails at least two tests.
2026-09-29 21:43:30 -05:00

62 lines
2.0 KiB
YAML

name: Validate release candidate
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
offline-checks:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- uses: actions/setup-node@v7
with:
node-version: "24"
- run: python scripts/validate_nodes.py
- run: python scripts/release_preflight.py
# The test files that need only the standard library. The rest import
# torch, NumPy or PyAV and run in ComfyUI's own Python environment.
- name: Standard-library Python tests
run: >-
python scripts/run_python_tests.py
tests/test_execution_helpers.py
tests/test_lora_helpers.py
tests/test_math_helpers.py
tests/test_media_paths.py
tests/test_memory_helpers.py
tests/test_node_api.py
tests/test_registry_contract.py
tests/test_registry_status.py
tests/test_resolution.py
tests/test_status_helpers.py
tests/test_utility_nodes.py
tests/test_validate_inputs.py
tests/test_workflow_contract.py
# `node --check file.js` passes a broken file that uses import or
# export when no package.json marks it as a module, so each file goes
# in on stdin with the module type stated.
- name: JavaScript syntax
run: |
status=0
while IFS= read -r -d '' file; do
node --input-type=module --check < "$file" || { echo "::error file=$file::syntax error"; status=1; }
done < <(git ls-files -z -- 'js/*.js' '*.mjs')
exit "$status"
- run: node --test --test-isolation=none tests/*.test.mjs
- name: Ruff (pyflakes and syntax errors)
run: |
python -m pip install ruff==0.16.3
ruff check --select F,E9 .