beekeeper 0.3.1

A full-featured worker pool library for parallelizing tasks
Documentation
name: Cargo Build & Test

on:
  push:
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  check:
    name: Check lints, formatting, and documentation
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: EmbarkStudios/cargo-deny-action@v2
        with:
          rust-version: "1.85.0"
      - uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          components: rustfmt, clippy
      - run: |
          cargo clippy --all-targets -F affinity,local-batch,retry \
            -- -D warnings $(cat .lints | cut -f1 -d"#" | tr '\n' ' ')
      - run: cargo fmt -- --check
      - run: RUSTDOCFLAGS="-D warnings" cargo doc -F affinity,local-batch,retry
      - run: cargo test -F affinity,local-batch,retry --doc

  coverage:
    name: Code coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions-rust-lang/setup-rust-toolchain@v1
      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov
      - name: Generate code coverage
        run: cargo llvm-cov --lcov --output-path lcov.info -F affinity,local-batch,retry
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v3
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: lcov.info
          fail_ci_if_error: true

  build_and_test:
    name: Build and test all combinations features
    runs-on: ubuntu-latest
    strategy:
      matrix:
        toolchain:
          - stable
          - beta
          - nightly
        channel:
          - default
          - crossbeam
          - flume
          - loole
    steps:
      - uses: actions/checkout@v4
      - uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          toolchain: ${{ matrix.toolchain }}
      - name: Install cargo-all-features
        uses: taiki-e/install-action@v2
        with:
          tool: cargo-all-features
      # Use the unified `cargo all-features <cmd> <args>` entrypoint: it forwards
      # cargo args (unlike the legacy `cargo build-all-features` shim, whose clap
      # parser rejects --features/-F). The channel feature is force-enabled while
      # all-features permutes the allowlisted features.
      - name: Build all feature combinations
        run: cargo all-features build --features ${{ matrix.channel }} --all-targets
      - name: Test all feature combinations
        run: cargo all-features test --features ${{ matrix.channel }} --lib