35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
name: Validate plugin
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
cpu-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7.0.1
|
|
- uses: actions/setup-python@v7.0.0
|
|
with:
|
|
python-version: '3.12'
|
|
- name: Install CPU test dependencies
|
|
run: |
|
|
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
python -m pip install numpy Pillow
|
|
- name: Run backend regression tests
|
|
run: python -m unittest discover -s tests -v
|
|
- name: Check frontend syntax and metadata
|
|
run: |
|
|
python - <<'PY'
|
|
import pathlib, subprocess, tomllib
|
|
config = tomllib.loads(pathlib.Path('pyproject.toml').read_text(encoding='utf-8'))
|
|
assert config['project']['name'] == 'adachi-inpaint-workbench'
|
|
assert config['tool']['comfy']['DisplayName'] == 'Adachi-Inpaint-Workbench'
|
|
for source in pathlib.Path('web').glob('*.js'):
|
|
subprocess.run(['node', '--input-type=module', '--check'], input=source.read_bytes(), check=True)
|
|
PY
|