- examples/plugin-demo: add plugin-call.mq.md and README sections for `marqdo plugin inspect` and the explicit trust flow (`--plugin`, `--trust-native-plugin`, `--allow-plugin`), including named-only plugin arguments, structured plugin errors and the in-process trust caveat. - .github/workflows/ci.yml: fmt --check, clippy -D warnings, workspace tests, CLI example smoke tests (factorial, math, refs, plugin inspect + invocation).
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
test:
|
|
name: fmt + clippy + test (Linux x86_64)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
- name: Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
- name: Formatting
|
|
run: cargo fmt --all -- --check
|
|
- name: Clippy
|
|
run: cargo clippy --workspace --all-targets -- -D warnings
|
|
- name: Tests
|
|
run: cargo test --workspace
|
|
- name: Smoke test the CLI examples
|
|
run: |
|
|
cargo build -p marqdo-cli
|
|
./target/debug/marqdo check examples/factorial.mq.md
|
|
./target/debug/marqdo call examples/factorial.mq.md 阶乘 --arg n=5
|
|
./target/debug/marqdo call examples/math.mq.md 计算圆面积
|
|
./target/debug/marqdo inspect examples/references.mq.md --refs
|
|
./examples/plugin-demo/build.sh
|
|
./target/debug/marqdo plugin inspect examples/plugin-demo
|
|
./target/debug/marqdo run examples/plugin-demo/plugin-call.mq.md \
|
|
--plugin examples/plugin-demo \
|
|
--trust-native-plugin \
|
|
--allow-plugin demo.solver
|