bevy_mqtt 0.10.0

A robust, secure MQTT client plugin for Bevy game engine with comprehensive error handling and performance optimizations
Documentation
name: CI

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

env:
  CARGO_TERM_COLOR: always

jobs:
  # Run cargo test on multiple platforms
  test:
    name: Test Suite (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4.2.2
        with:
          fetch-depth: 0

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

      - name: Cache cargo registry
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
          restore-keys: |
            ${{ runner.os }}-cargo-

      - name: Cache cargo build
        uses: actions/cache@v4
        with:
          path: target/
          key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
          restore-keys: |
            ${{ runner.os }}-cargo-build-target-

      - name: Install Dependencies (Ubuntu)
        if: matrix.os == 'ubuntu-latest'
        run: |
          sudo apt-get update
          sudo apt-get install -y \
            pkg-config \
            libx11-dev \
            libasound2-dev \
            libudev-dev \
            libxcb-render0-dev \
            libxcb-shape0-dev \
            libxcb-xfixes0-dev \
            libwayland-dev \
            libxkbcommon-dev \
            libvulkan-dev

      - name: Install Dependencies (macOS)
        if: matrix.os == 'macos-latest'
        run: |
          # Install any macOS-specific dependencies if needed
          brew install pkg-config

      - name: Install Dependencies (Windows)
        if: matrix.os == 'windows-latest'
        run: |
          # Windows-specific setup if needed
          echo "Windows dependencies setup"

      - name: Run cargo test
        run: cargo test --all-features

      - name: Run cargo test (no default features)
        run: cargo test --no-default-features --all-features

      - name: Run doc tests
        run: cargo test --doc --all-features

  # Run cargo clippy -- -D warnings
  clippy_check:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4.2.2
        with:
          fetch-depth: 0

      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy

      - name: Cache cargo registry
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
          key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.toml') }}
          restore-keys: |
            ${{ runner.os }}-cargo-clippy-

      - name: Install Dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y \
            pkg-config \
            libx11-dev \
            libasound2-dev \
            libudev-dev \
            libxcb-render0-dev \
            libxcb-shape0-dev \
            libxcb-xfixes0-dev \
            libwayland-dev \
            libxkbcommon-dev \
            libvulkan-dev

      - name: Run clippy
        run: cargo clippy --all-features -- -D warnings

      - name: Check clippy on examples
        run: cargo clippy --examples --all-features -- -D warnings

  # Run cargo fmt --all -- --check
  format:
    name: Format
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4.2.2

      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt

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

      - name: Check TOML formatting
        run: cargo install --quiet taplo-cli && taplo fmt --check

  # Security audit
  security:
    name: Security Audit
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4.2.2

      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@stable

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

      - name: Security audit
        run: >
          cargo audit
          --ignore RUSTSEC-2026-0104
          --ignore RUSTSEC-2026-0049
          --ignore RUSTSEC-2026-0098
          --ignore RUSTSEC-2026-0099
          --ignore RUSTSEC-2025-0134