ci: add zig version check #64
Workflow file for this run
This file contains 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: CI | |
on: [push, pull_request] | |
jobs: | |
test-example: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/libextism | |
- name: Install Zig | |
uses: goto-bus-stop/setup-zig@v2 | |
- name: Check Zig Version | |
run: zig version | |
- name: Compile example | |
run: | | |
zig build basic_example | |
- name: Test example | |
run : | | |
TEST=$(extism call zig-out/bin/Basic\ example.wasm --input "this is a test" --set-config='{"thing": "1", "a": "b"}' --log-level=debug count_vowels | jq) | |
echo $TEST | grep '"count": 4' | |
echo $TEST | grep '"config": "1"' | |
echo $TEST | grep '"a": "this is var a"' | |
TEST=$(extism call zig-out/bin/Basic\ example.wasm make_http_request --allow-host '*') | |
echo $TEST | |
echo $TEST | grep '"userId": 1' |