-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.06 KB
/
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
34
35
36
37
38
39
40
41
42
name: coverage
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Install dependencies
run: sudo apt-get install -y libsqlite3-dev
- name: Install grcov
run: cargo install grcov
- name: Run grcov
env:
PROJECT_NAME: "dinky"
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"
CARGO_INCREMENTAL: 0
run: |
cargo build --verbose
cargo test --verbose
zip -0 cov.zip $(find . -name "$PROJECT_NAME*.gc*" -print)
grcov cov.zip -s . -t lcov --llvm --ignore-not-existing --ignore "/*" -o lcov.info
- name: Push grcov results to Coveralls via GitHub Action
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "lcov.info"