Added grcov based code coverage reporting in github action
This commit is contained in:
parent
00f07818f9
commit
e626f2e255
32
.github/workflows/code_coverage.yml
vendored
32
.github/workflows/code_coverage.yml
vendored
@ -3,25 +3,35 @@ on: [push]
|
|||||||
name: Code Coverage
|
name: Code Coverage
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tarpaulin-codecov:
|
|
||||||
name: Tarpaulin to codecov.io
|
Codecov:
|
||||||
|
name: Code Coverage
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
CARGO_INCREMENTAL: '0'
|
||||||
|
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
|
||||||
|
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: Install rustup
|
||||||
|
run: curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||||
- name: Set default toolchain
|
- name: Set default toolchain
|
||||||
run: rustup default nightly
|
run: rustup default nightly
|
||||||
- name: Set profile
|
- name: Set profile
|
||||||
run: rustup set profile minimal
|
run: rustup set profile minimal
|
||||||
|
- name: Update toolchain
|
||||||
|
run: rustup update
|
||||||
|
- name: Test
|
||||||
|
run: cargo test --features all-keys,compiler,esplora,compact_filters --no-default-features
|
||||||
|
|
||||||
- name: Install tarpaulin
|
- id: coverage
|
||||||
run: cargo install cargo-tarpaulin
|
name: Generate coverage
|
||||||
- name: Tarpaulin
|
uses: actions-rs/grcov@v0.1.5
|
||||||
run: cargo tarpaulin --features all-keys,compiler,esplora,compact_filters --run-types Tests,Doctests --exclude-files "testutils/*" --out Xml
|
|
||||||
|
|
||||||
- name: Publish to codecov.io
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v1.0.15
|
uses: codecov/codecov-action@v1
|
||||||
with:
|
with:
|
||||||
fail_ci_if_error: true
|
file: ${{ steps.coverage.outputs.report }}
|
||||||
file: ./cobertura.xml
|
directory: ./coverage/reports/
|
||||||
|
13
codecov.yaml
Normal file
13
codecov.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
coverage:
|
||||||
|
status:
|
||||||
|
project:
|
||||||
|
default:
|
||||||
|
target: auto
|
||||||
|
threshold: 1%
|
||||||
|
base: auto
|
||||||
|
informational: false
|
||||||
|
patch:
|
||||||
|
default:
|
||||||
|
target: auto
|
||||||
|
threshold: 100%
|
||||||
|
base: auto
|
Loading…
x
Reference in New Issue
Block a user