* introduces vendor HID * updates workflows with new feature * feature renaming and variant covering
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
---
|
|
name: OpenSK code coverage report
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'src/**/*.rs'
|
|
- 'libraries/**/*.rs'
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
coveralls:
|
|
name: OpenSK code coverage
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: "true"
|
|
- name: Install Rust toolchain
|
|
run: rustup show
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.7
|
|
- name: Install Python dependencies
|
|
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
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --features "with_ctap1,vendor_hid,with_nfc,std" --no-fail-fast
|
|
env:
|
|
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: "./lcov.info"
|
|
|