Skip to content

Commit 6481faa

Browse files
committed
[ci] fix coverage command
1 parent e693634 commit 6481faa

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.github/workflows/coverage.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,14 @@ jobs:
2525
components: llvm-tools-preview
2626
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2
2727

28-
- name: Install latest nextest release
29-
uses: taiki-e/install-action@nextest
30-
- name: Install cargo-llvm-cov
31-
uses: taiki-e/install-action@cargo-llvm-cov
28+
- name: Install tools
29+
uses: taiki-e/install-action@8484225d9734e230a8bf38421a4ffec1cc249372 # v2
30+
with:
31+
tool: cargo-llvm-cov,just,nextest
3232

3333
- name: Collect coverage data
34-
# Generate separate reports for nextest and doctests, and combine them.
3534
run: |
36-
cargo llvm-cov --no-report nextest
37-
cargo llvm-cov --no-report --doc
38-
cargo llvm-cov report --doctests --lcov --output-path lcov.info
35+
just coverage --lcov --output-path lcov.info
3936
- name: Upload coverage data to codecov
4037
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5
4138
env:

Justfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ rustdoc:
1717
# Generate README.md files using `cargo-sync-rdme`.
1818
generate-readmes:
1919
cargo sync-rdme --toolchain nightly --all-features
20+
21+
# Collect coverage, pass in `--html` to get an HTML report
22+
coverage *args:
23+
cargo +nightly llvm-cov --no-report nextest --all-features
24+
cargo +nightly llvm-cov --no-report --doc --all-features
25+
cargo +nightly llvm-cov report --doctests {{args}}

0 commit comments

Comments
 (0)