Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: config check when set from args #6

Merged
merged 2 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
on: [push, pull_request]

name: CI

jobs:
install_and_test:
name: Install & Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rust:
- stable
steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true

- name: Setup Python env
uses: actions/setup-python@v4
with:
python-version: "3.9"
check-latest: true

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install CLI and extism lib
run: |
pip3 install cffi
pip3 install .
extism -h

extism install git

- name: Test CLI
run: |
echo "this is a test" | extism call test/code.wasm count_vowels
7 changes: 5 additions & 2 deletions extism_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,11 @@ def main():
extism.fetch(version="git")

# Merge args.set_config and args.config
config = json.loads(
args.set_config) if args.set_config is not None else None
if args.set_config is not None:
config = json.loads(args.set_config)
else:
config = None

if len(args.config) > 0:
if config is None:
config = {}
Expand Down
Binary file added test/code.wasm
Binary file not shown.