denolib / setup-deno

Set up your GitHub Actions workflow with a specific version of deno

Home Page:https://github.com/marketplace/actions/setup-deno-environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Infinite loop during installation

fr3fou opened this issue · comments

commented

After setting up my ci.yaml here - https://github.com/fr3fou/methor/blob/main/.github/workflows/ci.yaml and running the CI, I encounter an infinite loop (?) during the setup phase, causing the CI to time out
image
https://github.com/fr3fou/methor/runs/1379017245
The output is just non-stop "0"

import { evalExp, expression } from "./math.ts";

async function main() {
  const p = expression();
  while (true) {
    const input = await prompt("> ");
    console.log(evalExp(p(input)[0][0]));
  }
}

async function prompt(message: string) {
  const buf = new Uint8Array(1024);
  await Deno.stdout.write(new TextEncoder().encode(message));
  const n = <number> await Deno.stdin.read(buf);
  return new TextDecoder().decode(buf.subarray(0, n)).trim();
}

main();

This is because your code has an infinite loop.

The process never exits, and finally caused a timeout.

This is not caused by setup-deno.

commented

Thanks! My bad, I was looking at the wrong step