Skip to content

Commit e0957c2

Browse files
committed
Fix CI workflow to provide input and timeout for interactive chatbot executables
1 parent 4d48182 commit e0957c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/zig.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
run: cd c && make clean && make
1818

1919
- name: Test C executable runs
20-
run: cd c && ./chat
20+
run: cd c && echo -e "hi\npython\nexit" | timeout 5 ./chat || true
2121

2222
zig-build-and-test:
2323
runs-on: ubuntu-latest
@@ -36,4 +36,4 @@ jobs:
3636
run: cd zig && zig test src/chatbot.zig
3737

3838
- name: Test Zig executable runs
39-
run: cd zig && ./zig-out/bin/chat
39+
run: cd zig && echo -e "hi\npython\nexit" | timeout 5 ./zig-out/bin/chat || true

0 commit comments

Comments
 (0)