Skip to content

Commit b502a6b

Browse files
authored
chore: update the test CI (#761)
* update the test ci * install uv * create a folder * update
1 parent cc57c55 commit b502a6b

File tree

2 files changed

+18
-28
lines changed

2 files changed

+18
-28
lines changed

.github/workflows/pr-test.yaml

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -55,45 +55,35 @@ jobs:
5555
which python
5656
echo "Installing dependencies"
5757
conda install -c conda-forge gxx=11 gcc=11 libsndfile -y
58-
pip install torch==2.8 torchvision==0.23 --index-url https://download.pytorch.org/whl/cu128
59-
pip install -e ".[ci]"
58+
pip install uv
59+
uv pip install torch==2.8 torchvision==0.23 --index-url https://download.pytorch.org/whl/cu128
60+
uv pip install -e ".[ci]"
6061
- name: Setup ComfyUI
6162
run: |
6263
source $(conda info --base)/etc/profile.d/conda.sh
6364
conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
6465
which python
6566
cd ..
66-
rm -rf ComfyUI
67-
mkdir -p ComfyUI
68-
cd ComfyUI
69-
mkdir -p "${COMFYUI_MODELS_ROOT}"
70-
ln -s "${COMFYUI_MODELS_ROOT}" models
71-
mkdir -p custom_nodes
72-
cd custom_nodes
67+
rm -rf ComfyUI-nunchaku
7368
git clone -b dev https://github.com/mit-han-lab/ComfyUI-nunchaku.git
74-
pip install -r ComfyUI-nunchaku/requirements.txt
75-
git clone https://github.com/Fannovel16/comfyui_controlnet_aux.git
76-
cd comfyui_controlnet_aux
77-
git checkout cc6b232
78-
cd ..
79-
git clone https://github.com/CY-CHENYUE/ComfyUI-InpaintEasy.git
80-
cd ComfyUI-InpaintEasy
81-
pip install -r requirements.txt
82-
git checkout d631a03
69+
cd ComfyUI-nunchaku
70+
uv pip install --torch-backend=auto -e ".[ci]"
8371
cd ..
84-
cd ..
85-
ln -s custom_nodes/ComfyUI-nunchaku/tests tests
86-
pip install -r tests/requirements.txt
87-
python custom_nodes/ComfyUI-nunchaku/scripts/download_models.py
88-
mkdir -p input
89-
python custom_nodes/ComfyUI-nunchaku/scripts/download_inputs.py
72+
rm -rf test-workspace
73+
mkdir -p test-workspace
74+
cd test-workspace
75+
mkdir -p "${COMFYUI_MODELS_ROOT}"
76+
ln -s "${COMFYUI_MODELS_ROOT}" models
77+
ln -s ../ComfyUI-nunchaku/tests tests
78+
ln -s ../ComfyUI-nunchaku/test_data test_data
79+
python ../ComfyUI-nunchaku/scripts/setup_custom_nodes.py
9080
- name: Run ComfyUI tests
9181
run: |
9282
source $(conda info --base)/etc/profile.d/conda.sh
9383
conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
9484
pwd
95-
cd ../ComfyUI
96-
pytest tests/test_workflows.py -x -vv --reruns 2 --reruns-delay 0
85+
cd ../test-workspace
86+
pytest tests/test_workflows.py -x -vv --reruns 4 --reruns-delay 0
9787
- name: Run nunchaku tests
9888
run: |
9989
source $(conda info --base)/etc/profile.d/conda.sh
@@ -106,4 +96,4 @@ jobs:
10696
if: always()
10797
run: |
10898
cd ..
109-
rm -rf ComfyUI
99+
rm -rf test-workspace ComfyUI-nunchaku

.github/workflows/run_all_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def run_all_tests():
2525
failed_tests = []
2626
for test_file in tqdm(test_files):
2727
print(f"Running {test_file} ...")
28-
result = subprocess.run(["pytest", "--reruns", "2", "--reruns-delay", "0", "-vv", "-x", test_file])
28+
result = subprocess.run(["pytest", "--reruns", "4", "--reruns-delay", "0", "-vv", "-x", test_file])
2929
if result.returncode != 0:
3030
print(f"Test failed: {test_file}")
3131
failed_tests.append(test_file)

0 commit comments

Comments
 (0)