Add CI workflow for Zig build and tests #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Zig Build & Tests | |
| on: | |
| push: | |
| branches: [ main, zig-port ] | |
| pull_request: | |
| branches: [ main, zig-port ] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: goto-bus-stop/setup-zig@v2 | |
| with: | |
| version: 0.15.2 | |
| - name: Build chatbot | |
| run: zig build-exe src/main.zig -femit-bin=zig-out/bin/chat | |
| - name: Run tests | |
| run: zig test src/chatbot.zig | |
| - name: Test executable runs | |
| run: ./zig-out/bin/chat |