Skip to content

Commit a1112bc

Browse files
authored
ci: add code coverage job to CI workflow (#111)
add code coverage job
1 parent fdfb527 commit a1112bc

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,41 @@ jobs:
9797

9898
- name: Run tests
9999
run: cargo test --all-features
100+
101+
coverage:
102+
name: Code Coverage
103+
runs-on: ubuntu-latest
104+
steps:
105+
- uses: actions/checkout@v3
106+
107+
# install nodejs
108+
- name: Setup Node.js
109+
uses: actions/setup-node@v3
110+
with:
111+
node-version: '20'
112+
113+
- name: Install uv
114+
uses: astral-sh/setup-uv@v5
115+
116+
- name: Install Rust
117+
uses: dtolnay/rust-toolchain@stable
118+
119+
- name: Set up Python
120+
run: uv python install
121+
122+
- name: Create venv for python
123+
run: uv venv
124+
125+
- uses: Swatinem/rust-cache@v2
126+
127+
- name: Install cargo-llvm-cov
128+
run: cargo install cargo-llvm-cov
129+
130+
- name: Install llvm-tools-preview
131+
run: rustup component add llvm-tools-preview
132+
133+
- name: Run tests with coverage
134+
run: cargo llvm-cov --all-features
100135

101136
doc:
102137
name: Generate Documentation

0 commit comments

Comments
 (0)