tinyresp 0.2.1

A tiny Rust library implementing the Redis Serialization Protocol (RESP)
Documentation
name: Rust

on:
  push:
    branches: ["main"]
  pull_request:
    branches: ["main"]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

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

      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov

      - uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-rust-test-${{ hashFiles('**/Cargo.lock') }}

      - name: Run cargo fmt
        run: cargo fmt -- --check
  
      - name: Run clippy
        run: cargo clippy -- -D warnings
  
      - name: Run cargo check
        run: cargo check --all-features --locked --release
  
      - name: Run cargo build
        run: cargo build --locked --release
  
      - name: Generate code coverage
        run: cargo llvm-cov --all-features --lcov --output-path lcov.info

      - name: Upload coverage to codecov
        uses: codecov/codecov-action@v3
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: lcov.info
          fail_ci_if_error: true