Skip to content

Commit c192579

Browse files
committed
[ci] also generate coverage report for doctests
Per #1080.
1 parent ef523d1 commit c192579

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/coverage.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
push:
3-
branches: [ main, auto, canary ]
3+
branches: [main, auto, canary]
44
pull_request:
55
branches:
66
- main
@@ -22,14 +22,18 @@ jobs:
2222
with:
2323
components: llvm-tools-preview
2424
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2
25-
25+
2626
- name: Install latest nextest release
2727
uses: taiki-e/install-action@nextest
2828
- name: Install cargo-llvm-cov
2929
uses: taiki-e/install-action@cargo-llvm-cov
30-
30+
3131
- name: Collect coverage data
32-
run: cargo llvm-cov nextest --lcov --output-path lcov.info
32+
# Generate separate reports for nextest and doctests, and combine them.
33+
run: |
34+
cargo llvm-cov --no-report nextest
35+
cargo llvm-cov --no-report --doc
36+
cargo llvm-cov report --doctests --lcov --output-path lcov.info
3337
- name: Upload coverage data to codecov
3438
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3
3539
with:

0 commit comments

Comments
 (0)