Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: download grcov for code coverage
run: curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
- name: install llvm tools preview
run: rustup component add llvm-tools-preview
- name: install grcov
run: cargo install grcov --root .
- name: Build
run: cargo build --all-features
- name: Run tests
run: LLVM_PROFILE_FILE="your_name-%p-%m.profraw" cargo test --all-features
run: LLVM_PROFILE_FILE="rust-ocpp-%p-%m.profraw" cargo test --all-features
- name: Generate lcov.info for Code coverage
run: ./grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info
run: ./bin/grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info
- name: Codecov
uses: codecov/[email protected]
with:
files: ./lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
19 changes: 19 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
comment:
layout: "condensed_header, diff, flags, components"

component_management:
individual_components:
- component_id: v1.6
name: v.1.6
paths:
- src/v1_6
- component_id: v2.0
name: v.2.0.1
paths:
- src/v2_0_1

coverage:
status:
project:
default:
target: 20%
Loading