mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-31 00:03:01 +03:00
fix(tui): align CI with supported platforms
Wait for terminal setup before asserting signal cleanup on slower Intel runners. Do not advertise a Windows ARM64 sidecar while Bun lacks the FFI support OpenTUI requires there. Co-authored-by: Bingxi Zhao <150592536+pancacake@users.noreply.github.com>
This commit is contained in:
@@ -197,8 +197,6 @@ jobs:
|
||||
os: windows-latest
|
||||
- name: Terminal UI (Linux arm64)
|
||||
os: ubuntu-24.04-arm
|
||||
- name: Terminal UI (Windows arm64)
|
||||
os: windows-11-arm
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -26,8 +26,6 @@ jobs:
|
||||
target: linux-arm64
|
||||
- os: windows-latest
|
||||
target: win32-x64
|
||||
- os: windows-11-arm
|
||||
target: win32-arm64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
+17
-2
@@ -641,10 +641,25 @@ if (process.platform !== "win32") {
|
||||
stdout: "pipe",
|
||||
stderr: "pipe",
|
||||
})
|
||||
await Bun.sleep(250)
|
||||
const decoder = new TextDecoder()
|
||||
let output = ""
|
||||
const collectOutput = (async () => {
|
||||
const reader = child.stdout.getReader()
|
||||
while (true) {
|
||||
const { done, value } = await reader.read()
|
||||
if (done) break
|
||||
output += decoder.decode(value, { stream: true })
|
||||
}
|
||||
output += decoder.decode()
|
||||
})()
|
||||
|
||||
// Slow Intel runners can spend more than 250 ms importing OpenTUI. Wait
|
||||
// for terminal setup, which happens after the signal handlers are
|
||||
// registered, before exercising shutdown.
|
||||
await waitUntil(() => output.includes("\x1b[?1049h"), 5_000)
|
||||
child.kill("SIGTERM")
|
||||
const exitCode = await child.exited
|
||||
const output = await new Response(child.stdout).text()
|
||||
await collectOutput
|
||||
const error = await new Response(child.stderr).text()
|
||||
|
||||
expect(exitCode).toBe(0)
|
||||
|
||||
Reference in New Issue
Block a user