clincalc 0.2.2

Open, auditable clinical calculators: a pure scoring engine plus the `clincalc` CLI in one crate. The engine is a serde-only leaf (build with default-features = false); the default `cli` feature adds the `clincalc` binary.
Documentation
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 # v7.0.0

      - name: Install Rust toolchain (stable, with rustfmt and clippy)
        uses: dtolnay/rust-toolchain@67ef31d5b988238dd797d409d6f9574278e20537 # stable
        with:
          toolchain: stable
          components: rustfmt, clippy

      - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1

      - 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 # v7.0.0

      # Prebuilt binary (seconds) rather than a from-source `cargo install`.
      - name: Install cargo-audit
        uses: taiki-e/install-action@16b05812d776ae1dfaabc8277e421fb6d2506419 # v2.82.7
        with:
          tool: cargo-audit

      # Fails on any RustSec advisory affecting the locked tree, so a vulnerable
      # dependency is caught here rather than waiting on a Dependabot email. A
      # genuinely unfixable transitive advisory can be quarantined in audit.toml
      # (`[advisories] ignore = ["RUSTSEC-XXXX-NNNN"]`) with a note.
      - name: cargo audit
        run: cargo audit