nano-get 0.3.0

A tiny HTTP/1.1 GET and HEAD client with zero dependencies by default.
Documentation
name: Checker

on:
  pull_request:
    branches:
      - main
    types:
      - opened
      - reopened
      - synchronize
  workflow_dispatch:

permissions:
  contents: read

jobs:
  compliance-docs:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Validate compliance matrix/index drift
        run: python3 tools/check_compliance_docs.py

  fmt:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Install stable
        run: rustup toolchain install stable --profile minimal --component rustfmt

      - name: Check formatting
        run: cargo +stable fmt --all -- --check

  clippy-http:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Install stable
        run: rustup toolchain install stable --profile minimal --component clippy

      - name: Lint HTTP-only build
        run: cargo +stable clippy --workspace --all-targets --no-default-features --features http -- -D warnings

  clippy-all-features:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Install OpenSSL headers
        run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config

      - name: Install stable
        run: rustup toolchain install stable --profile minimal --component clippy

      - name: Lint all features
        run: cargo +stable clippy --workspace --all-targets --all-features -- -D warnings

  test-http:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        toolchain:
          - "1.71.0"
          - stable
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Install Rust
        run: rustup toolchain install ${{ matrix.toolchain }} --profile minimal

      - name: Resolve HTTP-only dependency graph
        run: |
          rm -f Cargo.lock
          cargo +${{ matrix.toolchain }} test --workspace --no-default-features --features http --no-run

      - name: Test HTTP-only build with locked dependencies
        run: cargo +${{ matrix.toolchain }} test --workspace --no-default-features --features http --locked

  test-all-features:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        toolchain:
          - "1.71.0"
          - stable
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Install OpenSSL headers
        run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config

      - name: Install Rust
        run: rustup toolchain install ${{ matrix.toolchain }} --profile minimal

      - name: Resolve all-features dependency graph
        run: |
          rm -f Cargo.lock
          cargo +${{ matrix.toolchain }} test --workspace --all-features --no-run

      - name: Test all features with locked dependencies
        run: cargo +${{ matrix.toolchain }} test --workspace --all-features --locked

  coverage-http:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Install stable
        run: rustup toolchain install stable --profile minimal

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

      - name: Enforce HTTP-only 100% line coverage
        run: |
          cargo llvm-cov clean --workspace
          cargo llvm-cov --workspace --no-default-features --features http \
            --lcov \
            --output-path /tmp/http_cov.info
          python3 tools/check_line_coverage.py --lcov /tmp/http_cov.info --root . --require 95

  coverage-all-features:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Install OpenSSL headers
        run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config

      - name: Install stable
        run: rustup toolchain install stable --profile minimal

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

      - name: Enforce all-features 100% line coverage
        run: |
          cargo llvm-cov clean --workspace
          cargo llvm-cov --workspace --all-features \
            --lcov \
            --output-path /tmp/all_cov.info
          python3 tools/check_line_coverage.py --lcov /tmp/all_cov.info --root . --require 95