-
Notifications
You must be signed in to change notification settings - Fork 7
37 lines (31 loc) · 1.09 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: CI
on: [pull_request, workflow_dispatch]
jobs:
test-example:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rust:
- stable
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/libextism
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Install wasm32 target
run: rustup target add wasm32-unknown-unknown
- name: Build plugins
run: make -B plugins
- name: Test call command
run: |
TEST=$(extism call test/code.wasm count_vowels --input "this is a test" --set-config='{"thing": "1", "a": "b"}')
echo $TEST | grep '"count":4'
echo $TEST | grep '"config":"1"'
echo $TEST | grep '"a":"this is var a"'
echo $TEST | grep '"b":"new_value"'
TEST=$(extism call test/http.wasm http_get --allow-host '*' --input '{"url": "https://jsonplaceholder.typicode.com/todos/1"}')
echo $TEST | grep '"userId": 1'