drep-ai 2.5.1

A local commit gate: runs the linters your repo configures, and sends changed code to an LLM for review
Documentation
name: rust

on:
  push:
    branches: [main]
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  # fmt and clippy are byte-identical work on every OS - there is no cfg(unix)
  # or cfg(windows) in the tree - and clippy's check-only artifacts do not seed
  # the codegen build that `cargo test` needs. Running them once, here, avoids
  # paying a second full pass over the dependency tree on the macOS runner.
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5

      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

      - uses: Swatinem/rust-cache@v2

      - name: Format
        run: cargo fmt --all --check

      # Lint levels come from [lints] in Cargo.toml, not from flags here.
      - name: Clippy
        run: cargo clippy --all-targets --all-features

  test-linux:
    name: test (ubuntu-latest)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5

      - uses: dtolnay/rust-toolchain@stable

      - uses: Swatinem/rust-cache@v2

      - run: cargo test --all-targets --all-features

  test-macos:
    name: test (macos-latest)
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v5

      - uses: dtolnay/rust-toolchain@stable

      - uses: Swatinem/rust-cache@v2

      - run: cargo test --all-targets --all-features

  msrv:
    name: msrv (1.88)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5

      # If this breaks, the MSRV in Cargo.toml is wrong - do not paper over it
      # by bumping the toolchain here. It has moved once already: `ignore`
      # 0.4.30 raised the real floor to 1.88 while open-agent-sdk still asks
      # for 1.85, and declares no `rust-version`, so the first sign was a
      # compile error in a dependency.
      - uses: dtolnay/rust-toolchain@1.88.0

      - uses: Swatinem/rust-cache@v2

      # No --all-targets: MSRV is a property of [dependencies]. Whether the dev
      # dependencies build on 1.85 has no consumer.
      - run: cargo check