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:
Xubin Ren
2026-08-17 20:56:10 +08:00
co-authored by Bingxi Zhao
parent 35f2d086b0
commit 406509aeb8
3 changed files with 17 additions and 6 deletions
-2
View File
@@ -197,8 +197,6 @@ jobs:
os: windows-latest os: windows-latest
- name: Terminal UI (Linux arm64) - name: Terminal UI (Linux arm64)
os: ubuntu-24.04-arm os: ubuntu-24.04-arm
- name: Terminal UI (Windows arm64)
os: windows-11-arm
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
-2
View File
@@ -26,8 +26,6 @@ jobs:
target: linux-arm64 target: linux-arm64
- os: windows-latest - os: windows-latest
target: win32-x64 target: win32-x64
- os: windows-11-arm
target: win32-arm64
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
+17 -2
View File
@@ -641,10 +641,25 @@ if (process.platform !== "win32") {
stdout: "pipe", stdout: "pipe",
stderr: "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") child.kill("SIGTERM")
const exitCode = await child.exited const exitCode = await child.exited
const output = await new Response(child.stdout).text() await collectOutput
const error = await new Response(child.stderr).text() const error = await new Response(child.stderr).text()
expect(exitCode).toBe(0) expect(exitCode).toBe(0)