tower-serve-static 0.1.2

Tower service that serves static files.
Documentation
name: CI

on: [push, pull_request]

env:
  CARGO_TERM_COLOR: always

jobs:
  build_and_test:
    name: Build and test
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]

    steps:
      - name: Check out repository
        uses: actions/checkout@v6

      - name: Cache crate
        uses: actions/cache@v4
        with:
          path: |

            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

      - name: Setup toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable

      - name: Build
        run: cargo build --verbose
      - name: Run tests without default features
        run: cargo test --verbose --no-default-features
      - name: Run tests with metadata feature
        run: cargo test --verbose --features metadata
  check_fmt:
    name: Check fmt
    runs-on: ubuntu-latest

    steps:
      - name: Check out repository
        uses: actions/checkout@v6

      - name: fmt
        run: cargo fmt -- --check

  coverage:
    name: Coverage
    runs-on: ubuntu-latest

    steps:
      - name: Check out repository
        uses: actions/checkout@v6

      - name: Cache crate
        uses: actions/cache@v4
        with:
          path: |

            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

      - name: Install Rust
        run: rustup toolchain install nightly --component llvm-tools-preview
      - name: Install cargo-llvm-cov
        run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin

      - name: Generate code coverage
        run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v2
        with:
          files: lcov.info
          fail_ci_if_error: true