esplora-client 0.12.3

Bitcoin Esplora API client library. Supports plaintext, TLS and Onion servers. Blocking or async
Documentation
on: [push, pull_request]

name: Code Coverage

jobs:
  Codecov:
    name: Code Coverage
    runs-on: ubuntu-latest
    env:
      RUSTFLAGS: "-Cinstrument-coverage"
      RUSTDOCFLAGS: "-Cinstrument-coverage"
      LLVM_PROFILE_FILE: "report-%p-%m.profraw"

    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Install lcov tools
        run: sudo apt-get install lcov -y
      - name: Install rustup
        run: curl https://sh.rustup.rs -sSf | sh -s -- -y
      - name: Set default toolchain
        run: rustup default nightly
      - name: Set profile
        run: rustup set profile minimal
      - name: Add llvm tools
        run: rustup component add llvm-tools-preview
      - name: Update toolchain
        run: rustup update
      - name: Cache cargo
        uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
      - name: Install grcov
        run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi
      - name: Test
        run: cargo test -- --test-threads=1
      - name: Run grcov
        run: mkdir coverage; grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '/*' -o ./coverage/lcov.info
      - name: Generate HTML coverage report
        run: genhtml -o coverage-report.html ./coverage/lcov.info
      - name: Coveralls upload
        uses: coverallsapp/github-action@master
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: coverage-report
          path: coverage-report.html