Skip to content

Commit fa01b7d

Browse files
committed
Update actions
1 parent ef68b74 commit fa01b7d

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: zTUI Runtime Test on Real Windows
22

33
on:
4+
workflow_dispatch:
45
push:
56
pull_request:
6-
workflow_dispatch:
77

88
jobs:
99
windows-test:
@@ -12,36 +12,36 @@ jobs:
1212
- uses: actions/checkout@v4
1313

1414
- name: Setup Zig
15-
uses: goto-bus-stop/setup-zig@v2
15+
uses: mlugg/setup-zig@v1
1616
with:
1717
version: 0.14.1
1818

19-
- name: Run Simple zTUI Example (init + draw + inputInit + hearing)
20-
shell: bash
19+
- name: Run zTUI Example (runtime check on Windows console)
20+
shell: bash
2121
run: |
22-
zig run - << 'EOF'
22+
zig run - <<'EOF'
2323
const std = @import("std");
2424
const ztui = @import("src/main.zig");
2525
2626
pub fn main() !void {
27-
var win = try ztui.tui().init(.{ .w = 50, .h = 15 }, std.heap.page_allocator);
27+
var win = try ztui.tui().init(.{ .w = 60, .h = 20 }, std.heap.page_allocator);
2828
defer win.deinit();
2929
3030
try win.appendRow("zTUI runtime test on REAL Windows!", .{});
31+
try win.appendRow("If no crash - init/draw OK", .{});
32+
try win.appendProgressBar(80);
3133
32-
try win.appendProgressBar(60);
34+
try win.inputInit(.{ .prompt = "Test > " });
3335
34-
try win.inputInit(.{ .prompt = "Test input > " });
35-
36-
win.draw(); # отрисовка
36+
win.draw();
3737
38-
var buff: [128]u8 = undefined;
38+
var buff: [256]u8 = undefined;
3939
const input = win.hearing(&buff) catch |err| {
40-
std.debug.print("Input error (expected in CI, no keyboard): {}\n", .{err});
40+
std.debug.print("Input error (no keyboard in CI - expected): {}\n", .{err});
4141
return;
4242
};
4343
44-
try win.appendRow("You typed: {s}", .{input});
44+
try win.appendRow("Typed: {s}", .{input});
4545
win.draw();
4646
}
4747
EOF

0 commit comments

Comments
 (0)