crawlex 1.0.4

Stealth crawler with Chrome-perfect TLS/H2 fingerprint, render pool, hooks, persistent queue
Documentation
name: CI

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

env:
  CARGO_TERM_COLOR: always
  CARGO_INCREMENTAL: 0
  RUSTFLAGS: -D warnings
  # Tests + builds against `--all-features` blow past the 14 GB of free
  # disk on stock `ubuntu-latest`. Trim debug info so each rlib stays
  # lean; the `disk-cleanup` step on the heavy jobs frees ~25 GB more.
  CARGO_PROFILE_DEV_DEBUG: "0"
  CARGO_PROFILE_TEST_DEBUG: "0"

jobs:
  fmt:
    name: Formatting
    runs-on: ubuntu-latest
    timeout-minutes: 5
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: "1.91"
          components: rustfmt
      - run: cargo fmt --all -- --check

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
      - name: Free disk space
        uses: jlumbroso/free-disk-space@main
        with:
          tool-cache: false
          android: true
          dotnet: true
          haskell: true
          large-packages: true
          docker-images: true
          swap-storage: false
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: "1.91"
          components: clippy
      - name: Install build deps
        run: |
          sudo apt-get update
          sudo apt-get install -y ninja-build clang mold
      - uses: Swatinem/rust-cache@v2
      - name: Clippy default features
        run: cargo clippy --locked --all-targets -- -D warnings
      - name: Clippy all features
        run: cargo clippy --locked --all-targets --all-features -- -D warnings

  test:
    name: Test Suite
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
      - name: Free disk space
        # `cargo test --all-features` links every integration test binary
        # against the full dep graph; the resulting target/ tree blows
        # past the 14 GB of free space on stock ubuntu-latest. The
        # cleanup action prunes Android, .NET, Haskell, and the
        # docker/large packages cache (~25 GB combined).
        uses: jlumbroso/free-disk-space@main
        with:
          tool-cache: false
          android: true
          dotnet: true
          haskell: true
          large-packages: true
          docker-images: true
          swap-storage: false
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: "1.91"
      - name: Install build deps
        run: |
          sudo apt-get update
          sudo apt-get install -y ninja-build clang mold
      - uses: Swatinem/rust-cache@v2
      - run: cargo test --locked --all-features

  build-full:
    name: Build crawlex (full)
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
      - name: Free disk space
        uses: jlumbroso/free-disk-space@main
        with:
          tool-cache: false
          android: true
          dotnet: true
          haskell: true
          large-packages: true
          docker-images: true
          swap-storage: false
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: "1.91"
      - name: Install build deps
        run: |
          sudo apt-get update
          sudo apt-get install -y ninja-build clang mold
      - uses: Swatinem/rust-cache@v2
      - name: Build crawlex (full, HTTP + render)
        run: cargo build --locked --bin crawlex --all-features

  build-mini:
    name: Build crawlex-mini (HTTP-only)
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: "1.91"
      - name: Install build deps
        run: |
          sudo apt-get update
          sudo apt-get install -y ninja-build clang mold
      - uses: Swatinem/rust-cache@v2
      - name: Build crawlex-mini (no browser deps)
        run: cargo build --locked --bin crawlex-mini --no-default-features --features cli,sqlite

  package:
    name: cargo publish dry-run
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
      - name: Free disk space
        uses: jlumbroso/free-disk-space@main
        with:
          tool-cache: false
          android: true
          dotnet: true
          haskell: true
          large-packages: true
          docker-images: true
          swap-storage: false
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: "1.91"
      - name: Install build deps
        run: |
          sudo apt-get update
          sudo apt-get install -y ninja-build clang mold
      - uses: Swatinem/rust-cache@v2
      - name: Verify Cargo.toml + package.json version match
        run: node scripts/sync-version.js --check
      - name: cargo publish --dry-run
        run: cargo publish --dry-run --locked