Skip to content

Commit

Permalink
add code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Boneberger committed Oct 19, 2023
1 parent f0ddcb0 commit 8eaa2a7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/actions-rs/grcov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/
source-dir: .
binary-path: ./target/debug/
output-type: lcov
branch: true
ignore-not-existing: true
llvm: true
output-path: ./lcov.info
24 changes: 22 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,25 @@ jobs:
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy --all-features -- -D warnings
- name: Run tests
run: cargo test --all-features --verbose -- --test-threads=1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
command: clean
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast --verbose -- --test-threads=1
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests -Cinstrument-coverage -Copt-level=0'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests -Cinstrument-coverage -Copt-level=0'
- uses: actions-rs/grcov@0.2-proto
- name: Codecov
uses: codecov/codecov-action@v3
with:
verbose: true
fail_ci_if_error: true
files: lcov.info

0 comments on commit 8eaa2a7

Please sign in to comment.