-
Notifications
You must be signed in to change notification settings - Fork 14
45 lines (42 loc) · 1.49 KB
/
code_coverage.yml
File metadata and controls
45 lines (42 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Code Coverage
on: [push, pull_request]
permissions:
contents: read
pull-requests: write
jobs:
Coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2026-04-09
override: true
cache: true
components: llvm-tools-preview
- name: Install cargo-llvm-cov
run: if [[ ! -e ~/.cargo/bin/cargo-llvm-cov ]]; then cargo install cargo-llvm-cov; fi
- name: Make coverage directory
run: mkdir coverage
- name: Test and export lcov coverage
run: cargo llvm-cov -q --branch --all --ignore-filename-regex "(examples/|tests/)" --all-features --lcov --output-path ./coverage/lcov.info
- name: Generate HTML coverage report
run: cargo llvm-cov -q --branch --all --ignore-filename-regex "(examples/|tests/)" --all-features --html
- name: Codecov upload
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
files: ./coverage/lcov.info
flags: rust
name: codecov-bdk-tx
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: coverage-report
path: target/llvm-cov/html