mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 06:40:48 +08:00
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
name: Backend Tests
|
|
|
|
#
|
|
# This workflow is a test of the python package build.
|
|
# Install Python dependencies across different Python versions.
|
|
#
|
|
|
|
on: [ push ]
|
|
|
|
jobs:
|
|
build_and_execute_linux:
|
|
environment: "Testing"
|
|
name: Installation, Unit and Workflow Tests for Linux
|
|
runs-on: ${{ matrix.runner.labels }}
|
|
container: ${{ matrix.runner.container }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
runner:
|
|
- labels: [self-hosted, Linux, X64, cuda-3090-24gb]
|
|
container: "nvcr.io/nvidia/pytorch:25.03-py3"
|
|
steps:
|
|
- run: |
|
|
apt update || true
|
|
pip uninstall -y $(pip list --format=freeze | grep opencv)
|
|
rm -rf /usr/local/lib/python3.12/dist-packages/cv2/
|
|
name: Prepare Python
|
|
- run: |
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
name: Install uv
|
|
- uses: actions/checkout@v4
|
|
name: Checkout git repo
|
|
- name: Install ComfyUI
|
|
run: |
|
|
export UV_BREAK_SYSTEM_PACKAGES=true
|
|
export UV_SYSTEM_PYTHON=true
|
|
pip freeze | grep numpy > numpy_override.txt
|
|
uv pip install . --inexact --group dev --override numpy_override.txt
|
|
- name: Run tests
|
|
run: |
|
|
nvidia-smi
|
|
export OTEL_METRICS_EXPORTER=none
|
|
pytest -v tests/unit
|
|
- name: Lint for errors
|
|
run: |
|
|
pylint --rcfile=.pylintrc comfy/
|
|
pylint --rcfile=.pylintrc comfy_extras/
|