http-cache-stream 0.4.0

A HTTP cache implementation for streaming bodies.
Documentation
name: CI

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  format:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Update Rust
        run: rustup update nightly && rustup default nightly
      - name: Install rustfmt
        run: rustup component add rustfmt
      - run: cargo fmt -- --check

  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Update Rust
        run: rustup update stable && rustup default stable
      - name: Install clippy
        run: rustup component add clippy
      - run: cargo clippy -- --deny warnings
      - run: cargo clippy --no-default-features --features smol -- --deny warnings
      - run: cargo clippy -p http-cache-stream-reqwest -- --deny warnings

  test:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
      - uses: actions/checkout@v4
      - name: Update Rust
        run: rustup update stable && rustup default stable
      - uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
      - name: Test for tokio feature
        run: cargo test --no-default-features --features tokio
      - name: Test for smol feature
        run: cargo test --no-default-features --features smol
      - name: Test for reqwest
        run: cargo test -p http-cache-stream-reqwest

  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Update Rust
        run: rustup update stable && rustup default stable
      - run: cargo doc

  msrv:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Update Rust
        run: rustup update stable && rustup default stable
      - name: Install cargo-binstall
        run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
      - name: Install cargo-msrv
        run: cargo binstall -y --version 0.16.0-beta.23 cargo-msrv
      - name: Verify MSRV (tokio)
        run: cargo msrv verify --output-format minimal --no-default-features --features tokio
      - name: Verify MSRV (smol)
        run: cargo msrv verify --output-format minimal --no-default-features --features smol
      - name: Verify MSRV for reqwest
        working-directory: ./crates/reqwest
        run: cargo msrv verify --output-format minimal