batch-impl 0.5.2

A proc-macro library for batch generating trait impls with a powerful DSL
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  fmt:
    name: fmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt
      - run: cargo fmt --check

  clippy:
    name: clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo clippy --all-targets -- -D warnings

  test:
    name: test (${{ matrix.toolchain }})
    strategy:
      fail-fast: false
      matrix:
        toolchain: [stable, 1.93.0]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@${{ matrix.toolchain }}
      - uses: Swatinem/rust-cache@v2
      # stable 全量(含 trybuild UI 快照与 doctest)
      - name: test (stable, full)
        if: matrix.toolchain == 'stable'
        run: cargo test
      # MSRV 只跑功能/回归,跳过 trybuild 快照(.stderr 措辞随 rustc 漂移)
      - name: test (MSRV, functional)
        if: matrix.toolchain == '1.93.0'
        run: cargo test --lib --test dsl --test regression

  doc:
    name: doc
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - run: cargo doc --no-deps