Skip to content

Commit 5afe9f8

Browse files
Copilotjosecelano
andcommitted
feat: [#90] add coverage CI workflow
Co-authored-by: josecelano <[email protected]>
1 parent 213b269 commit 5afe9f8

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
coverage:
12+
name: Coverage Report
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- id: checkout
17+
name: Checkout Repository
18+
uses: actions/checkout@v4
19+
20+
- id: setup
21+
name: Setup Toolchain
22+
uses: dtolnay/rust-toolchain@stable
23+
24+
- id: cache
25+
name: Enable Workflow Cache
26+
uses: Swatinem/rust-cache@v2
27+
28+
- id: install-llvm-cov
29+
name: Install cargo-llvm-cov
30+
uses: taiki-e/install-action@v2
31+
with:
32+
tool: cargo-llvm-cov
33+
34+
- id: coverage-text
35+
name: Generate Text Coverage Summary
36+
run: cargo cov
37+
38+
- id: coverage-html
39+
name: Generate HTML Coverage Report
40+
run: cargo cov-html
41+
42+
- id: upload-coverage
43+
name: Upload HTML Coverage Report
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: coverage-html-report
47+
path: target/llvm-cov/html/
48+
retention-days: 30

0 commit comments

Comments
 (0)