bdk_wallet 3.0.0

A modern, lightweight, descriptor-based wallet library
Documentation
name: Code Coverage

# Generates code coverage reports using cargo-llvm-cov and uploads results to Codecov.
# Runs on every push and pull request to track test coverage metrics.
# Uploads coverage data to Codecov for tracking and produces an HTML report artifact for download.

on: [push, pull_request]

permissions:
  contents: read
  pull-requests: write

jobs:
  Coverage:
    name: Code Coverage
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v6
        with:
          persist-credentials: false
      - name: Install Rust toolchain
        uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          toolchain: nightly
          components: llvm-tools-preview
          cache: true
      - name: Install cargo-llvm-cov
        run: cargo install cargo-llvm-cov
      - name: Generate coverage data
        run: cargo llvm-cov --all-features --branch --quiet --ignore-filename-regex "test_utils" --lcov --output-path lcov.info
        env:
          RUSTFLAGS: "--cfg coverage_nightly"
      - name: Generate HTML coverage report
        run: cargo llvm-cov --all-features --branch --quiet --ignore-filename-regex "test_utils" --html
        env:
          RUSTFLAGS: "--cfg coverage_nightly"
      - name: Codecov upload
        uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
        with:
          files: ./lcov.info
          flags: rust
          name: codecov-bdk-wallet
          token: ${{ secrets.CODECOV_TOKEN }}
          fail_ci_if_error: false
      - name: Upload artifact
        uses: actions/upload-artifact@v7
        with:
          name: coverage-report
          path: target/llvm-cov/html