Skip to content

Commit 8ed0837

Browse files
authored
fix: include doctests in test coverage calculations (#397)
* update tarpaulin used in CI to latest available version * fix: try including `--doc --examples` in tarpaulin arguments, to include coverage by doctests and code examples * revert back to 0.22.0 until tarpaulin action is fixed: actions-rs/tarpaulin#23 It seems like the download is broken in the `actions-rs/tarpaulin` GitHub Action for all tarpaulin versions above `0.22.0`. See this pending fix for details: actions-rs/tarpaulin#23 * try with the nightly toolchain for code coverage of doctests * document in-code the current problem with artefact download blocking tarpaulin update * try with `--run-types Tests,Doctests` for full coverage: xd009642/tarpaulin#538
1 parent 8beee14 commit 8ed0837

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/rust.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ jobs:
5252
with:
5353
submodules: recursive
5454

55-
- name: Install stable toolchain
55+
- name: Install nightly toolchain
5656
uses: actions-rs/toolchain@v1.0.6
5757
with:
58-
toolchain: stable
58+
toolchain: nightly
5959
override: true
6060

6161
- name: Install system dependencies
@@ -67,8 +67,9 @@ jobs:
6767
- name: Run cargo-tarpaulin
6868
uses: actions-rs/tarpaulin@v0.1
6969
with:
70+
# TODO: update to latest tarpaulin once artefact download is fixed: https://github.com/actions-rs/tarpaulin/pull/23
7071
version: "0.22.0"
71-
args: "--all-features --out Lcov -- --test-threads 1"
72+
args: "--all-features --run-types Tests,Doctests --out Lcov -- --test-threads 1"
7273

7374
- name: Upload coverage
7475
uses: coverallsapp/github-action@v1

0 commit comments

Comments
 (0)