From 5c08c572504b06bf127772615bfc23cc299d34dd Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Fri, 20 Oct 2023 18:46:22 +0100 Subject: [PATCH] install python --- .github/workflows/test-ui.yaml | 3 +++ tests-ui/setup.js | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) 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..."); } }