diff --git a/.github/workflows/test-ui.yaml b/.github/workflows/test-ui.yaml index 0c20111ca..4861dfc5b 100644 --- a/.github/workflows/test-ui.yaml +++ b/.github/workflows/test-ui.yaml @@ -10,6 +10,9 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' - name: Run Tests run: | npm install diff --git a/tests-ui/setup.js b/tests-ui/setup.js index 5bfd2eca3..6419fbaa2 100644 --- a/tests-ui/setup.js +++ b/tests-ui/setup.js @@ -54,6 +54,16 @@ async function setup() { python = "python"; } child = spawn(python, ["-s", "ComfyUI/main.py", "--cpu"], { cwd: "../.." }); + child.on("error", (err) => { + console.log(`Server error (${err})`); + i = 30; + }); + child.on("exit", (code) => { + if (!success) { + console.log(`Server exited (${code})`); + i = 30; + } + }); } await new Promise((r) => { setTimeout(r, 1000); @@ -64,7 +74,7 @@ async function setup() { child?.kill(); if (!success) { - throw new Error("Waiting for server timed out..."); + throw new Error("Waiting for server failed..."); } }