-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 1.05 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
name: CI
on: [push, pull_request]
jobs:
test-example:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
rust:
- stable
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/libextism
- name: Install wasm32-wasi-ghc
run: |
git clone https://gitlab.haskell.org/ghc/ghc-wasm-meta
pushd ghc-wasm-meta
FLAVOUR=9.8 ./setup.sh
- name: Build examples
run: |
source ~/.ghc-wasm/env
make
- name: Test call command
run: |
TEST=$(extism call ./count_vowels.wasm count_vowels --wasi --input "this is a test")
echo $TEST | grep '"count":4'
TEST=$(extism call ./hello.wasm testing --wasi --input "Name" --config greeting="Hi there")
echo $TEST | grep 'Hi there, Name'
TEST=$(extism call ./http_get.wasm http_get --wasi --input "https://jsonplaceholder.typicode.com/todos/1" --allow-host '*.typicode.com')
echo $TEST | grep '"userId": 1'