query-string-builder 0.6.0

A query string builder for percent encoding key-value pairs
Documentation
---
name: Rust

on:
  push:
    branches: [ "main" ]
    paths:
      - 'Cargo.toml'
      - 'Cargo.lock'
      - 'src/**'
      - 'crates/**'
      - 'bins/**'
      - '.github/workflows/rust.yml'
  pull_request:
    branches: [ "main" ]
    paths:
      - 'Cargo.toml'
      - 'Cargo.lock'
      - 'src/**'
      - 'crates/**'
      - 'bins/**'
      - '.github/workflows/rust.yml'

env:
  CARGO_TERM_COLOR: always

jobs:
  lint:
    name: Lint code
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Check format
        run: cargo fmt --check

  build:
    needs: lint
    name: Build and Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ ubuntu-latest, macos-latest, windows-latest ]
        features:
          - '--all-features'
          # - '--no-default-features'
          # - ''
    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: cargo build --verbose
      - uses: taiki-e/install-action@nextest
      - name: Run tests
        run: cargo nextest run --verbose ${{ matrix.features }}
      - name: Run doctests
        run: cargo test --doc --verbose ${{ matrix.features }}

  codecov:
    needs: lint
    name: Code Coverage
    runs-on: ubuntu-latest
    env:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: cargo build --verbose
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: llvm-tools-preview
      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov
      - name: Install nextest
        uses: taiki-e/install-action@nextest
      - name: Generate code coverage
        run: cargo llvm-cov nextest --all-features --workspace --lcov --output-path lcov.info
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v4.0.1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: lcov.info
          fail_ci_if_error: true