ComfyUI/.github/workflows/test.yml
doctorpangloss 95d47276e9 Improve tests and distributed error notifications
- Tests now perform faster
 - Tests will run on supported GPU platforms
 - Configuration has known issues related to setting up a working
   directory for an embedded client
 - Introduce a Skeletonize node that solves many problems with Canny
 - Improve behavior of exception reporting
2024-07-04 10:16:02 -07:00

50 lines
1.9 KiB
YAML

name: Build package
#
# This workflow is a test of the python package build.
# Install Python dependencies across different Python versions.
#
on: [ push ]
jobs:
build:
name: Build Test
runs-on: ${{ matrix.runner.labels }}
container: ${{ matrix.runner.container }}
strategy:
fail-fast: false
matrix:
runner:
- labels: [self-hosted, Linux, X64, cpu]
container: "ubuntu"
- labels: [self-hosted, Linux, X64, ipex-a380-6gb]
container: "intel/intel-optimized-pytorch:2.3.0-pip-base"
- labels: [self-hosted, Linux, X64, rocm-7600-8gb]
container: "rocm/pytorch:rocm6.0.2_ubuntu22.04_py3.10_pytorch_2.1.2"
- labels: [self-hosted, Linux, X64, cuda-3060-12gb]
container: "nvcr.io/nvidia/pytorch:24.03-py3"
steps:
- run: |
apt update
apt install -y nodejs python3 python3-pip git build-essential ffmpeg libsm6 libxext6
pip uninstall -y $(pip list --format=freeze | grep opencv) &&
rm -rf /usr/local/lib/python3.10/dist-packages/cv2/ || rm -rf /usr/local/lib/python3.11/dist-packages/cv2/ || rm -rf /usr/local/lib/python3.12/dist-packages/cv2/
ln -s `which python3` /usr/bin/python || true
ln -s `which pip3` /usr/bin/pip || true
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install setuptools pip --upgrade --break-system-packages || python -m pip install pip --upgrade || true
pip install --break-system-packages --no-build-isolation .[dev] || pip install --no-build-isolation .[dev]
- name: Run unit tests
run: |
export HSA_OVERRIDE_GFX_VERSION=11.0.0
pytest -v tests/unit
- name: Run all tests
run: |
export HSA_OVERRIDE_GFX_VERSION=11.0.0
pytest -v tests
- name: Lint for errors
run: |
pylint comfy