trait-kit 0.3.0

Module Standard Interface and Capability Management Center — A lightweight Rust library that provides a standard interface for module definition and Kit capability management.
Documentation
# trait-kit CI 质量门禁:fmt / clippy / test / security / docs
name: trait-kit CI

on:
  push:
    branches: [main, master]
  pull_request:

permissions:
  contents: read

concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: "-D warnings"

jobs:
  format:
    name: cargo fmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt
      - uses: swatinem/rust-cache@v2
      - run: cargo fmt --all -- --check

  clippy:
    name: cargo clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - uses: swatinem/rust-cache@v2
      - name: Install protoc
        run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
      - run: cargo clippy --all-targets --all-features -- -D warnings

  test:
    name: cargo test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
      - uses: swatinem/rust-cache@v2
      - name: Install protoc
        run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
      - run: cargo test --all-features --lib

  security:
    name: cargo deny
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
      - uses: swatinem/rust-cache@v2
      - run: cargo install cargo-deny
      - run: cargo deny check

  docs:
    name: cargo doc
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
      - uses: swatinem/rust-cache@v2
      - name: Install protoc
        run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
      - run: cargo doc --no-deps --all-features