Skip to content

Commit 05a0ac4

Browse files
authored
Track code coverage metrics (#22)
1 parent d86ece4 commit 05a0ac4

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,33 @@ env:
1616
RUSTFLAGS: --deny warnings
1717

1818
jobs:
19+
coverage:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions-rust-lang/setup-rust-toolchain@v1
26+
with:
27+
components: llvm-tools-preview
28+
29+
- uses: Swatinem/rust-cache@v2
30+
31+
- uses: taiki-e/install-action@v2
32+
with:
33+
tool: cargo-llvm-cov
34+
35+
- name: Generate coverage report
36+
run: cargo llvm-cov --workspace --all-features --all-targets --lcov --output-path lcov.info
37+
38+
- name: Upload coverage reports to Codecov
39+
uses: codecov/codecov-action@v5
40+
with:
41+
token: ${{ secrets.CODECOV_TOKEN }}
42+
files: lcov.info
43+
flags: unit
44+
fail_ci_if_error: true
45+
1946
lint:
2047
runs-on: ubuntu-latest
2148

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## vim-profiler 🕒
22

33
[![CI](https://github.com/terror/vim-profiler/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/terror/zk/actions/workflows/ci.yaml)
4+
[![codecov](https://codecov.io/github/terror/vim-profiler/graph/badge.svg?token=5BJLERWSY1)](https://codecov.io/github/terror/vim-profiler)
45
[![crates.io](https://shields.io/crates/v/vim-profiler.svg)](https://crates.io/crates/vim-profiler)
56
[![dependency status](https://deps.rs/repo/github/terror/vim-profiler/status.svg)](https://deps.rs/repo/github/terror/vim-profiler)
67

0 commit comments

Comments
 (0)