rustnetconf 0.12.0

An async-first NETCONF 1.0/1.1 client library for Rust
Documentation
name: CI

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

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: -D warnings

jobs:
  test:
    name: Test (workspace, all features)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install system dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y cmake

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

      - name: Cache cargo registry and target
        uses: Swatinem/rust-cache@v2

      - name: Build
        run: cargo build --workspace --all-features --verbose

      - name: Test
        # Live-device integration tests (`integration_vsrx`,
        # `integration_vendor_pool`) opt in via `RUSTNETCONF_TEST_VSRX_HOST`
        # and are no-ops here in hosted CI without lab access.
        run: cargo test --workspace --all-features --verbose

  clippy:
    name: Clippy (workspace, all features)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install system dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y cmake

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

      - name: Cache cargo registry and target
        uses: Swatinem/rust-cache@v2

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

  fmt:
    name: Rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

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

      - name: Check formatting
        run: cargo fmt --all -- --check

  audit:
    name: cargo audit
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

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

      - name: Install cargo-audit
        run: cargo install --locked cargo-audit

      - name: Run cargo audit
        run: cargo audit