somo 1.2.0

A human-friendly alternative to netstat for socket and port monitoring on Linux and macOS.
name: Continuous Integration

on:
  push:
    paths-ignore:
      - "**/README.md"
    branches:
      - master
  pull_request:
    branches: ["**"]
  workflow_dispatch:
  workflow_call:

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]

    steps:
    - name: Setup | Rust
      uses: dtolnay/rust-toolchain@stable
      with:
        components: rustfmt, clippy, rust-src

    - name: Setup | Checkout
      uses: actions/checkout@v5

    - name: Build | Compile
      run: cargo build


  check-format:
    runs-on: ubuntu-latest
    steps:
    - name: Setup | Rust
      uses: dtolnay/rust-toolchain@stable

    - name: Setup | Checkout
      uses: actions/checkout@v5

    - name: Check | Fmt Check
      run: cargo fmt -- --check


  check-clippy:
    runs-on: ubuntu-latest
    steps:
    - name: Setup | Rust
      uses: dtolnay/rust-toolchain@stable

    - name: Setup | Checkout
      uses: actions/checkout@v5

    - name: Check | Clippy
      run: cargo clippy --no-deps -- -Dwarnings


  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
    steps:
    - name: Setup | Rust
      uses: dtolnay/rust-toolchain@stable

    - name: Setup | Checkout
      uses: actions/checkout@v5

    - name: Test | Run
      run: cargo test

  nix:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: DeterminateSystems/nix-installer-action@90bb610b90bf290cad97484ba341453bd1cbefea # v19
      - run: nix run 'path:.?dir=nix'