Skip to content

Commit

Permalink
[ci] fix coverage command
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshowers committed Dec 24, 2024
1 parent 09cbeed commit 64755dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,14 @@ jobs:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # 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: Install tools
uses: taiki-e/install-action@8484225d9734e230a8bf38421a4ffec1cc249372 # v2
with:
tool: cargo-llvm-cov,just,nextest

- name: Collect coverage data
# 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
just coverage --lcov --output-path lcov.info
- name: Upload coverage data to codecov
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5
env:
Expand Down
6 changes: 6 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ rustdoc:
# Generate README.md files using `cargo-sync-rdme`.
generate-readmes:
cargo sync-rdme --toolchain nightly --all-features

# Collect coverage, pass in `--html` to get an HTML report
coverage *args:
cargo +nightly llvm-cov --no-report nextest --all-features
cargo +nightly llvm-cov --no-report --doc --all-features
cargo +nightly llvm-cov report --doctests {{args}}

0 comments on commit 64755dc

Please sign in to comment.