From 18dfe4ec12c73522d053ee8710d99ed1de624315 Mon Sep 17 00:00:00 2001 From: "Albert J. Wong" Date: Fri, 12 Apr 2024 20:56:18 -0700 Subject: [PATCH] Add doctest support into coverage (#105) --- .github/workflows/CI.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5ed1cb9..4417f73 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -46,13 +46,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + # Nighty needed for --doctests support. See https://github.com/taiki-e/cargo-llvm-cov/issues/2 + - uses: dtolnay/rust-toolchain@nightly - name: Cache cargo build uses: Swatinem/rust-cache@v2 - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + run: cargo llvm-cov --all-features --workspace --lcov --doctests --output-path lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: