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: ...@@ -55,45 +55,35 @@ jobs:
which python which python
echo "Installing dependencies" echo "Installing dependencies"
conda install -c conda-forge gxx=11 gcc=11 libsndfile -y 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 uv
pip install -e ".[ci]" 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 - name: Setup ComfyUI
run: | run: |
source $(conda info --base)/etc/profile.d/conda.sh source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; } conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
which python which python
cd .. cd ..
rm -rf ComfyUI rm -rf ComfyUI-nunchaku
mkdir -p ComfyUI
cd ComfyUI
mkdir -p "${COMFYUI_MODELS_ROOT}"
ln -s "${COMFYUI_MODELS_ROOT}" models
mkdir -p custom_nodes
cd custom_nodes
git clone -b dev https://github.com/mit-han-lab/ComfyUI-nunchaku.git git clone -b dev https://github.com/mit-han-lab/ComfyUI-nunchaku.git
pip install -r ComfyUI-nunchaku/requirements.txt cd ComfyUI-nunchaku
git clone https://github.com/Fannovel16/comfyui_controlnet_aux.git uv pip install --torch-backend=auto -e ".[ci]"
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 .. cd ..
cd .. rm -rf test-workspace
ln -s custom_nodes/ComfyUI-nunchaku/tests tests mkdir -p test-workspace
pip install -r tests/requirements.txt cd test-workspace
python custom_nodes/ComfyUI-nunchaku/scripts/download_models.py mkdir -p "${COMFYUI_MODELS_ROOT}"
mkdir -p input ln -s "${COMFYUI_MODELS_ROOT}" models
python custom_nodes/ComfyUI-nunchaku/scripts/download_inputs.py 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 - name: Run ComfyUI tests
run: | run: |
source $(conda info --base)/etc/profile.d/conda.sh source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; } conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
pwd pwd
cd ../ComfyUI cd ../test-workspace
pytest tests/test_workflows.py -x -vv --reruns 2 --reruns-delay 0 pytest tests/test_workflows.py -x -vv --reruns 4 --reruns-delay 0
- name: Run nunchaku tests - name: Run nunchaku tests
run: | run: |
source $(conda info --base)/etc/profile.d/conda.sh source $(conda info --base)/etc/profile.d/conda.sh
...@@ -106,4 +96,4 @@ jobs: ...@@ -106,4 +96,4 @@ jobs:
if: always() if: always()
run: | run: |
cd .. cd ..
rm -rf ComfyUI rm -rf test-workspace ComfyUI-nunchaku
...@@ -25,7 +25,7 @@ def run_all_tests(): ...@@ -25,7 +25,7 @@ def run_all_tests():
failed_tests = [] failed_tests = []
for test_file in tqdm(test_files): for test_file in tqdm(test_files):
print(f"Running {test_file} ...") 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: if result.returncode != 0:
print(f"Test failed: {test_file}") print(f"Test failed: {test_file}")
failed_tests.append(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