Source-based coverage (#416)
* tweaks for grcov * github action instead of run command * branch name * no branch name anymore
This commit is contained in:
13
.github/workflows/coveralls.yml
vendored
13
.github/workflows/coveralls.yml
vendored
@@ -26,6 +26,8 @@ jobs:
|
||||
run: python -m pip install --upgrade pip setuptools wheel
|
||||
- name: Set up OpenSK
|
||||
run: ./setup.sh
|
||||
- name: Install llvm tools
|
||||
run: rustup component add llvm-tools-preview
|
||||
|
||||
- name: Install grcov
|
||||
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo +stable install grcov; fi
|
||||
@@ -34,14 +36,13 @@ jobs:
|
||||
command: test
|
||||
args: --features "with_ctap1,with_nfc,std" --no-fail-fast
|
||||
env:
|
||||
CARGO_INCREMENTAL: '0'
|
||||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
|
||||
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
|
||||
- uses: actions-rs/grcov@v0.1.5
|
||||
id: coverage
|
||||
RUSTFLAGS: "-Zinstrument-coverage"
|
||||
LLVM_PROFILE_FILE: "opensk-%p-%m.profraw"
|
||||
- name: Run grcov
|
||||
run: grcov . --binary-path ./target/debug/ --source-dir . --output-type lcov --ignore-not-existing ---output-path ./lcov.info --ignore "/*" --ignore "examples/*" --ignore "third_party/*"
|
||||
- uses: coverallsapp/github-action@1.1.3
|
||||
name: upload report to coveralls
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
path-to-lcov: ${{ steps.coverage.outputs.report }}
|
||||
path-to-lcov: "./lcov.info"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user