From 2f845b6d785b14e0ac2082825690796905086e65 Mon Sep 17 00:00:00 2001 From: huchenlei Date: Thu, 13 Jun 2024 20:04:00 -0400 Subject: [PATCH] Add CI workflow --- .github/workflows/test-ui.yaml | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/test-ui.yaml diff --git a/.github/workflows/test-ui.yaml b/.github/workflows/test-ui.yaml new file mode 100644 index 00000000..7cb5da81 --- /dev/null +++ b/.github/workflows/test-ui.yaml @@ -0,0 +1,40 @@ +name: Tests CI + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout ComfyUI + uses: actions/checkout@v4 + with: + repository: "comfyanonymous/ComfyUI" + ref: main + - name: Checkout ComfyUI_frontend + uses: actions/checkout@v4 + with: + repository: "huchenlei/ComfyUI_frontend" + - uses: actions/setup-node@v3 + with: + node-version: 18 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Install requirements + run: | + python -m pip install --upgrade pip + pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu + pip install -r requirements.txt + pip install wait-for-it + - name: Start ComfyUI server + run: | + cd ComfyUI + python main.py --cpu + - name: Run UI tests + run: | + wait-for-it --service 127.0.0.1:8188 -t 600 + npm ci + npm run test:generate + npm test -- --verbose + working-directory: ComfyUI_frontend/tests-ui