Skip to content

Commit 02512d7

Browse files
committed
Fixed coverage issues
1 parent d8010ba commit 02512d7

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/coverage.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,32 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13+
1314
- uses: dtolnay/rust-toolchain@stable
14-
- uses: Swatinem/rust-cache@v2
15+
16+
- name: Cache cargo
17+
uses: Swatinem/rust-cache@v2
1518

1619
- name: Install cargo-llvm-cov
1720
uses: taiki-e/install-action@v2
1821
with:
1922
tool: cargo-llvm-cov
2023

21-
- name: Run coverage (HTML + lcov)
24+
# Generate LCOV + HTML reports
25+
- name: Run coverage (HTML + LCOV)
2226
run: |
2327
cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
24-
cargo llvm-cov --all-features --workspace --html --output-path target/llvm-cov/html
28+
cargo llvm-cov --all-features --workspace --html --output-dir target/llvm-cov/html
29+
30+
# If you're using Codecov, keep this. If not, you can delete it.
31+
- name: Upload LCOV to Codecov
32+
if: ${{ success() && vars.USE_CODECOV == 'true' }}
33+
uses: codecov/codecov-action@v4
34+
with:
35+
files: lcov.info
36+
fail_ci_if_error: true
2537

38+
# Always upload HTML as an artifact so you can download & open index.html
2639
- name: Upload HTML coverage artifact
2740
uses: actions/upload-artifact@v4
2841
with:

0 commit comments

Comments
 (0)