astral_async_http_range_reader 0.12.0

A library for streaming reading of files over HTTP using range requests
Documentation
on:
  push:
    branches:
      - "main"
  pull_request:

name: Rust

permissions: {}

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  RUST_LOG: info
  RUST_BACKTRACE: 1
  RUSTFLAGS: "-D warnings"
  CARGO_TERM_COLOR: always

jobs:
  check-rustdoc-links:
    name: Check intra-doc links
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
        with:
          persist-credentials: false
      - uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1
      - run: cargo rustdoc --all-features -- -D warnings -W unreachable-pub

  format_and_lint:
    name: Format and Lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
        with:
          persist-credentials: false
      - uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1
        with:
          components: clippy, rustfmt
      - name: Run rustfmt
        uses: actions-rust-lang/rustfmt@4066006ec54a31931b9b1fddfd38f2fdf2d27143 # v1.1.2
      - name: Run clippy
        run: cargo clippy

  build:
    name: ubuntu-latest
    runs-on: ubuntu-latest
    needs: [ format_and_lint ]
    steps:
      - name: Checkout source code
        uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
        with:
          persist-credentials: false
      - name: Install Rust toolchain
        uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1
        with:
          components: rustfmt
      - name: Build
        run: cargo build
      - name: Run tests
        run: cargo test -- --nocapture