axum-api-kit 2.0.0

Shared response types for Axum JSON APIs: ApiError, ListResponse, and HealthResponse
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:

jobs:
  ci:
    name: Test, Lint, Format
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

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

      - uses: Swatinem/rust-cache@v2

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

      - name: Clippy
        run: cargo clippy --all-targets --all-features -- -D warnings

      - name: Test (default features)
        run: cargo test

      - name: Test (all features)
        run: cargo test --all-features

  audit:
    name: Security audit
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v4

      - uses: dtolnay/rust-toolchain@stable

      - name: Install cargo-audit
        uses: taiki-e/install-action@cargo-audit

      - name: Generate lockfile
        # Cargo.lock is gitignored for this library, so resolve a fresh one and
        # audit the dependency versions a downstream `cargo build` would get.
        run: cargo generate-lockfile

      - name: Run security audit
        # --deny warnings promotes unsound/unmaintained/yanked advisories to
        # failures instead of letting them accumulate silently. No advisory is
        # ignored: the two that previously were (RUSTSEC-2024-0421 idna 0.5,
        # RUSTSEC-2024-0370 proc-macro-error) came only through validator 0.18
        # and were cleared by the validator 0.20 bump (v2.0.0) - 0.20 pulls
        # idna 1.x and proc-macro-error3.
        run: cargo audit --deny warnings