sendmer 0.4.4

A cli tool to send directories over the network, with NAT hole punching
Documentation
name: tests

on:
  push:
    branches:
      # This helps fill the caches properly, caches are not shared between PRs.
      - main
    # Don't run CI for changes that only touch docs or license files
    paths-ignore:
      - '**/*.md'
      - 'README*'
      - 'LICENSE'
      - 'LICENSE*'
      - '.gitignore'
      - 'docs/**'
  pull_request:
    branches:
      - main
    paths-ignore:
      - '**/*.md'
      - 'README*'
      - 'LICENSE'
      - 'LICENSE*'
      - '.gitignore'
      - 'docs/**'

env:
  MSRV: "1.88"
  RUST_BACKTRACE: 1
  RUSTFLAGS: -Dwarnings
  IROH_FORCE_STAGING_RELAYS: "1"

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: swatinem/rust-cache@v2
      - name: cargo fmt
        run: cargo fmt --all -- --check
      - name: cargo clippy
        run: cargo clippy --locked --workspace --all-targets --all-features

  test:
    runs-on: ${{ matrix.target.os }}
    strategy:
      fail-fast: false
      matrix:
        target:
          - os: "ubuntu-latest"
            toolchain: "x86_64-unknown-linux-gnu"
            name: "Linux GNU"
          - os: "macOS-latest"
            toolchain: "x86_64-apple-darwin"
            name: "macOS"
          - os: "windows-latest"
            toolchain: "x86_64-pc-windows-msvc"
            name: "Windows MSVC"
          - os: "windows-latest"
            toolchain: "x86_64-pc-windows-gnu"
            name: "Windows GNU"
        channel:
          - "stable"
          - "beta"
          - "nightly"
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: ${{ matrix.channel }}
          targets: ${{ matrix.target.toolchain }}
      - uses: swatinem/rust-cache@v2
      - name: cargo test
        run: cargo test --locked --workspace --all-features --bins --tests --examples

  # Checks correct runtime deps and features are requested by not including dev-dependencies.
  check-deps:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: swatinem/rust-cache@v2
      - name: cargo check
        run: cargo check --workspace --all-features --bins