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