ibapi 3.0.1

A Rust implementation of the Interactive Brokers TWS API, providing a reliable and user friendly interface for TWS and IB Gateway. Designed with a focus on simplicity and performance.
Documentation
name: Coverage

on:
  push:
    branches:
      - main

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1

jobs:
  coverage:
    name: Coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      # Coverage runs on nightly (not the pinned 1.95.0 toolchain used by
      # build/test/CI) so doc-tests can be instrumented. rustdoc's
      # --persist-doctests sits behind -Z unstable-options; without it the
      # report misses every `# Examples` block AND inserts phantom uncovered
      # regions on `..Default::default()` and `/// ```` lines. Mirrors `just
      # cover`. Stable still gates build/clippy/test in ci.yml.
      - uses: dtolnay/rust-toolchain@nightly
        with:
          components: llvm-tools-preview
      - uses: Swatinem/rust-cache@v2
      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@v2
        with:
          tool: cargo-llvm-cov
      - name: Generate coverage (sync + async + doctests, merged)
        # `+nightly` overrides rust-toolchain.toml (pinned to stable 1.95.0).
        # Without it, rustdoc rejects `-Z unstable-options --persist-doctests`.
        # Mirrors `just cover`.
        run: |
          mkdir -p coverage
          cargo +nightly llvm-cov clean --workspace
          cargo +nightly llvm-cov --no-report --doctests --no-default-features --features sync
          cargo +nightly llvm-cov --no-report --doctests --no-default-features --features async
          cargo +nightly llvm-cov report --lcov --output-path coverage/lcov.info
      - name: Upload to Coveralls
        uses: coverallsapp/github-action@v2
        with:
          file: coverage/lcov.info
          allow-empty: true