[ci] Add code coverage github actions workflow

This commit is contained in:
Steve Myers 2020-10-27 15:13:51 -07:00
parent 30f1ff5ab5
commit 40bf9f8b79
No known key found for this signature in database
GPG Key ID: 8105A46B22C2D051
3 changed files with 82 additions and 0 deletions

29
.github/workflows/code_coverage.yml vendored Normal file
View File

@ -0,0 +1,29 @@
on: [push]
name: Code Coverage
jobs:
tarpaulin-codecov:
name: Tarpaulin to codecov.io
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: tarpaulin
uses: actions-rs/tarpaulin@v0.1.2
with:
version: '0.15.0'
args: '-- --test-threads 1'
- name: codecov.io
uses: codecov/codecov-action@v1.0.14
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true

View File

@ -10,6 +10,7 @@
<p>
<!-- <a href="https://crates.io/crates/magical"><img alt="Crate Info" src="https://img.shields.io/crates/v/magical.svg"/></a> -->
<a href="https://github.com/bitcoindevkit/bdk/actions?query=workflow%3A%22Continuous+integration%22"><img alt="Continuous integration Status" src="https://github.com/bitcoindevkit/bdk/workflows/Continuous%20integration/badge.svg"></a>
<a href="https://codecov.io/gh/bitcoindevkit/bdk"><img src="https://codecov.io/gh/bitcoindevkit/bdk/branch/master/graph/badge.svg"/></a>
<a href="https://bitcoindevkit.org/docs-rs/bdk"><img alt="API Docs" src="https://img.shields.io/badge/docs.rs-bdk-green"/></a>
<a href="https://blog.rust-lang.org/2020/07/16/Rust-1.45.0.html"><img alt="Rustc Version 1.45+" src="https://img.shields.io/badge/rustc-1.45%2B-lightgrey.svg"/></a>
<a href="https://discord.gg/d7NkDKm"><img alt="Chat on Discord" src="https://img.shields.io/discord/753336465005608961?logo=discord"></a>

52
tarpaulin.toml Normal file
View File

@ -0,0 +1,52 @@
[feature_default_coverage]
features = "default"
exclude-files = ["testutils/*"]
run-types = ["Tests", "Doctests"]
[feature_minimal_coverage]
features = "minimal"
no-default-features = true
exclude-files = ["testutils/*"]
run-types = ["Tests", "Doctests"]
[feature_all-keys_coverage]
features = "all-keys"
no-default-features = true
exclude-files = ["testutils/*"]
run-types = ["Tests", "Doctests"]
[feature_minimal_and_esplora_coverage]
features = "minimal esplora"
no-default-features = true
exclude-files = ["testutils/*"]
run-types = ["Tests", "Doctests"]
[feature_key-value-db_coverage]
features = "key-value-db"
no-default-features = true
exclude-files = ["testutils/*"]
run-types = ["Tests", "Doctests"]
[feature_electrum_coverage]
features = "electrum"
no-default-features = true
exclude-files = ["testutils/*"]
run-types = ["Tests", "Doctests"]
[feature_compact_filters_coverage]
features = "compact_filters"
no-default-features = true
exclude-files = ["testutils/*"]
run-types = ["Tests", "Doctests"]
[feature_cli-utils_coverage]
features = "cli-utils esplora key-value-db electrum"
no-default-features = true
exclude-files = ["testutils/*"]
run-types = ["Tests", "Doctests"]
[feature_compiler_coverage]
features = "compiler"
no-default-features = true
exclude-files = ["testutils/*"]
run-types = ["Tests", "Doctests"]