# 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-get update # required for opencv apt-get install --no-install-recommends -y ffmpeg libsm6 libxext6 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/ build_and_execute_macos: environment: "Testing" name: Unit Tests for macOS runs-on: macos-14 steps: - uses: actions/checkout@v4 name: Checkout git repo - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.12' - name: Install system dependencies run: brew install ffmpeg - name: Install uv run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Install ComfyUI run: uv pip install '.[mps,dev]' --inexact - name: Run tests run: | export OTEL_METRICS_EXPORTER=none pytest -v tests/unit