name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: fmt, clippy, test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: Install Rust toolchain (stable, with rustfmt and clippy)
uses: dtolnay/rust-toolchain@67ef31d5b988238dd797d409d6f9574278e20537 with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4
- name: Formatting
run: cargo fmt --all --check
- name: Clippy (default features)
run: cargo clippy --all-targets -- -D warnings
- name: Clippy (MCP feature)
run: cargo clippy --all-targets --features mcp -- -D warnings
- name: Tests (default features)
run: cargo test
- name: Tests (leaf engine)
run: cargo test --no-default-features
- name: Tests (MCP feature)
run: cargo test --features mcp
audit:
name: Security audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: Install cargo-audit
uses: taiki-e/install-action@16b05812d776ae1dfaabc8277e421fb6d2506419 with:
tool: cargo-audit
- name: cargo audit
run: cargo audit