Skip to content

Commit 55a0653

Browse files
committed
ci: add code coverage support
Signed-off-by: wanglei01 <[email protected]>
1 parent 97182ef commit 55a0653

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ jobs:
2020
with:
2121
toolchain: stable
2222
override: true
23+
components: cargo, llvm-tools-preview
24+
25+
- name: Install cargo-llvm-cov
26+
uses: taiki-e/install-action@cargo-llvm-cov
27+
28+
- name: Test and Generate code coverage
29+
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v3
32+
with:
33+
files: lcov.info
34+
fail_ci_if_error: true
35+
2336

24-
- name: Test with default feature
25-
run: cargo test

0 commit comments

Comments
 (0)