watchdog_utils_II 0.5.5

Library for user management for scout and watchdog
Documentation
name: Rust CI

on:
  push:
    branches: ['**']
  pull_request:
    branches: ['**']

env:
  CARGO_TERM_COLOR: always

jobs:
  build_and_test:
    name: Build and Test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Set Up Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          components: clippy, rustfmt
          override: true

      - name: Cache Cargo Dependencies
        uses: Swatinem/rust-cache@v2

      - name: Check Code Formatting
        run: cargo fmt --all -- --check

      - name: Run Clippy (Linter)
        run: cargo clippy --all-targets --all-features -- -D warnings

      - name: Build Project
        run: cargo build --verbose

      - name: Run Tests
        run: cargo test --verbose

  udeps:
    name: Unused Dependencies (cargo-udeps)
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Set Up Rust (nightly for udeps)
        uses: dtolnay/rust-toolchain@nightly

      - name: Cache Cargo Dependencies
        uses: Swatinem/rust-cache@v2

      - name: Install cargo-udeps
        run: cargo +nightly install cargo-udeps --locked

      - name: Run cargo-udeps
        run: cargo +nightly udeps --workspace --all-targets --all-features

  taplo:
    name: Taplo (TOML formatting)
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Set Up Rust (stable for cargo install)
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true

      - name: Cache Cargo Dependencies
        uses: Swatinem/rust-cache@v2

      - name: Install taplo
        run: cargo +stable install taplo-cli --version ^0.9 --locked --force

      - name: Check TOML formatting with taplo
        run: taplo format --check