-
Notifications
You must be signed in to change notification settings - Fork 12
33 lines (32 loc) · 1007 Bytes
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Coverage
on: [push, pull_request]
jobs:
coverage:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v2
- name: install mosquitto
run: sudo apt-get install -y mosquitto mosquitto-clients
- name: install rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: llvm-tools-preview
override: true
- name: install grcov
run: cargo install grcov
- name: Coverage
env:
RUSTFLAGS: "-Zinstrument-coverage"
LLVM_PROFILE_FILE: "mshrtsr-%p-%m.profraw"
RUST_TEST_THREADS: 1
run: >
cargo build &&
cargo test &&
grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.info