typesafe-ai-sdk 0.4.0

Rust client for the TypeSafe AI System One API (Noul, Choice and Score questions)
Documentation
name: ci
on:
  push:
    branches: [main]
  pull_request:
permissions:
  contents: read
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        toolchain: ["1.88", stable]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.toolchain }}
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo fmt --check
      - run: cargo clippy -p typesafe-ai-sdk -p typesafe-derive --all-features --all-targets -- -D warnings
      - run: cargo test --all-features
      - run: cargo test -p typesafe-derive
      - run: cargo test --no-default-features
  repl:
    # The learning REPL is a workspace member, not part of the published crate.
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo fmt -p jev-repl --check
      - run: cargo clippy -p jev-repl --all-targets -- -D warnings
      - run: cargo test -p jev-repl

  live:
    # Optional smoke test against the real API; runs only when the secret is configured.
    if: ${{ github.event_name == 'push' }}
    runs-on: ubuntu-latest
    env:
      TYPESAFE_API_KEY: ${{ secrets.TYPESAFE_API_KEY }}
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - if: ${{ env.TYPESAFE_API_KEY != '' }}
        run: cargo run --example triage