Unverified Commit b502a6b3 authored by Muyang Li's avatar Muyang Li Committed by GitHub
Browse files

chore: update the test CI (#761)

* update the test ci

* install uv

* create a folder

* update
parent cc57c55b
......@@ -55,45 +55,35 @@ jobs:
which python
echo "Installing dependencies"
conda install -c conda-forge gxx=11 gcc=11 libsndfile -y
pip install torch==2.8 torchvision==0.23 --index-url https://download.pytorch.org/whl/cu128
pip install -e ".[ci]"
pip install uv
uv pip install torch==2.8 torchvision==0.23 --index-url https://download.pytorch.org/whl/cu128
uv pip install -e ".[ci]"
- name: Setup ComfyUI
run: |
source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
which python
cd ..
rm -rf ComfyUI
mkdir -p ComfyUI
cd ComfyUI
mkdir -p "${COMFYUI_MODELS_ROOT}"
ln -s "${COMFYUI_MODELS_ROOT}" models
mkdir -p custom_nodes
cd custom_nodes
rm -rf ComfyUI-nunchaku
git clone -b dev https://github.com/mit-han-lab/ComfyUI-nunchaku.git
pip install -r ComfyUI-nunchaku/requirements.txt
git clone https://github.com/Fannovel16/comfyui_controlnet_aux.git
cd comfyui_controlnet_aux
git checkout cc6b232
cd ..
git clone https://github.com/CY-CHENYUE/ComfyUI-InpaintEasy.git
cd ComfyUI-InpaintEasy
pip install -r requirements.txt
git checkout d631a03
cd ComfyUI-nunchaku
uv pip install --torch-backend=auto -e ".[ci]"
cd ..
cd ..
ln -s custom_nodes/ComfyUI-nunchaku/tests tests
pip install -r tests/requirements.txt
python custom_nodes/ComfyUI-nunchaku/scripts/download_models.py
mkdir -p input
python custom_nodes/ComfyUI-nunchaku/scripts/download_inputs.py
rm -rf test-workspace
mkdir -p test-workspace
cd test-workspace
mkdir -p "${COMFYUI_MODELS_ROOT}"
ln -s "${COMFYUI_MODELS_ROOT}" models
ln -s ../ComfyUI-nunchaku/tests tests
ln -s ../ComfyUI-nunchaku/test_data test_data
python ../ComfyUI-nunchaku/scripts/setup_custom_nodes.py
- name: Run ComfyUI tests
run: |
source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
pwd
cd ../ComfyUI
pytest tests/test_workflows.py -x -vv --reruns 2 --reruns-delay 0
cd ../test-workspace
pytest tests/test_workflows.py -x -vv --reruns 4 --reruns-delay 0
- name: Run nunchaku tests
run: |
source $(conda info --base)/etc/profile.d/conda.sh
......@@ -106,4 +96,4 @@ jobs:
if: always()
run: |
cd ..
rm -rf ComfyUI
rm -rf test-workspace ComfyUI-nunchaku
......@@ -25,7 +25,7 @@ def run_all_tests():
failed_tests = []
for test_file in tqdm(test_files):
print(f"Running {test_file} ...")
result = subprocess.run(["pytest", "--reruns", "2", "--reruns-delay", "0", "-vv", "-x", test_file])
result = subprocess.run(["pytest", "--reruns", "4", "--reruns-delay", "0", "-vv", "-x", test_file])
if result.returncode != 0:
print(f"Test failed: {test_file}")
failed_tests.append(test_file)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment