diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a7e2c0a7979..7ebb101a660 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,6 +1,6 @@ on: push: - branches: [ main, auto, canary ] + branches: [main, auto, canary] pull_request: branches: - main @@ -22,14 +22,18 @@ jobs: with: components: llvm-tools-preview - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 - + - name: Install latest nextest release uses: taiki-e/install-action@nextest - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - + - name: Collect coverage data - run: cargo llvm-cov nextest --lcov --output-path lcov.info + # Generate separate reports for nextest and doctests, and combine them. + run: | + cargo llvm-cov --no-report nextest + cargo llvm-cov --no-report --doc + cargo llvm-cov report --doctests --lcov --output-path lcov.info - name: Upload coverage data to codecov uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3 with: