Skip to content

Commit 0992d0b

Browse files
committed
Merge pull request #16 from 'ci/update-coverage-job'
- generate coverage report and upload to coveralls - add coveralls badge
2 parents 7ec0a0e + 022a8d7 commit 0992d0b

2 files changed

Lines changed: 31 additions & 10 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
name: Code Coverage
22

3-
on:
4-
push:
5-
branches: [ "develop" ]
6-
pull_request:
3+
on: [push, pull_request]
74

85
env:
96
CARGO_TERM_COLOR: always
107

8+
permissions: {}
9+
1110
jobs:
1211
coverage:
1312
name: Code Coverage
1413
runs-on: ubuntu-latest
15-
env:
16-
CARGO_INCREMENTAL: 0
1714
steps:
1815
- name: Checkout
1916
uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
19+
- name: Install lcov tools
20+
run: sudo apt-get install lcov -y
2021
- name: Install Rust toolchain
2122
uses: dtolnay/rust-toolchain@v1
2223
with:
@@ -26,5 +27,18 @@ jobs:
2627
uses: Swatinem/rust-cache@v2.7.8
2728
- name: Install cargo-llvm-cov
2829
run: if [[ ! -e ~/.cargo/bin/cargo-llvm-cov ]]; then cargo install cargo-llvm-cov; fi
30+
- name: Make coverage directory
31+
run: mkdir coverage
2932
- name: Test and report coverage
30-
run: cargo +nightly llvm-cov -q --doctests --branch --workspace --ignore-filename-regex "example-crates/*"
33+
run: cargo +nightly llvm-cov -q --doctests --branch --all --ignore-filename-regex "example-crates/*" --all-features --lcov --output-path ./coverage/lcov.info
34+
- name: Generate HTML coverage report
35+
run: genhtml -o coverage-report.html --ignore-errors unmapped ./coverage/lcov.info
36+
- name: Coveralls upload
37+
uses: coverallsapp/github-action@master
38+
with:
39+
github-token: ${{ secrets.GITHUB_TOKEN }}
40+
- name: Upload artifact
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: coverage-report
44+
path: coverage-report.html

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
# `bdk-sp`
22

3+
<div align="center">
4+
<p>
5+
<strong>An experimental crate to research the implementation of silent payment tools in BDK.</strong>
6+
</p>
7+
8+
<p>
9+
<a href="https://coveralls.io/github/bitcoindevkit/bdk-sp?branch=master"><img src="https://coveralls.io/repos/github/bitcoindevkit/bdk-sp/badge.svg?branch=master"/></a>
10+
</p>
11+
</div>
12+
313
> [!WARNING]
414
> Work in progress. Not recommended for use with bitcoin mainnet.
515
6-
This is an experimental crate to research the implementation of silent payment
7-
tools in BDK.
8-
916
![execution flow enabled by this crate](../media/sp_flow.gif?raw=true)
1017

1118
This is a second iteration of the work initiated in [rust-bip352].

0 commit comments

Comments
 (0)