narrate 0.4.2

narrate is a set of CLI app utilities for error handling and status reporting
Documentation
name: tests

on:
  push:
    branches:
      - 'main'
      - "ci"

  pull_request:
    branches:
      - 'main'
      - 'dev'

env:
  RUST_BACKTRACE: 1

jobs:
  tests:
    strategy:
      fail-fast: false
      matrix:
        # minimum supported rust version
        rust: [1.70.0, stable]
        on: 
          - { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
          - { os: macos-latest, target: x86_64-apple-darwin }
          - { os: windows-latest, target: x86_64-pc-windows-msvc }

    runs-on: ${{ matrix.on.os }}
    steps:
      - uses: actions/checkout@v4

      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust }}
          target: ${{ matrix.on.target }}

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

      - name: Build tests
        run: cargo test --no-run --locked --all-features

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

  rustfmt:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

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

      - name: Run rustfmt
        run: cargo fmt -- --check
  
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

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

      - name: cargo doc
        env:
          RUSTDOCFLAGS: --cfg docsrs -D warnings
        run: cargo doc --no-deps --all-features --document-private-items

  clippy:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        feature: [default, cli-error, error, report]
    steps:
      - uses: actions/checkout@v4

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

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

      - name: Run clippy
        run: cargo clippy --no-default-features --features ${{ matrix.feature }} -- -D warnings