install python

This commit is contained in:
pythongosssss 2023-10-20 18:46:22 +01:00
parent e09c8a351f
commit 5c08c57250
2 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -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...");
}
}