-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (40 loc) · 1.43 KB
/
codecov.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
43
44
45
46
name: Rust codecov
# NB actions-rs/grcov seems out of date
# ideally want PR for ignore lines
# see https://github.com/actions-rs/grcov/pull/90
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
run: cargo build --verbose
- name: Install cargo-llvm-cov and run tests
run: cargo install cargo-llvm-cov && cargo llvm-cov --lcov --output-path=./lcov.info
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cinstrument-coverage'
RUSTDOCFLAGS: '-Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cinstrument-coverage'
- name: Codecov
# You may pin to the exact commit or the version.
# uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378
# uses: codecov/[email protected]
uses: codecov/[email protected]
with:
# Repository upload token - get it from codecov.io. Required only for private repositories
token: ${{ secrets.CODECOV_TOKEN }}
file: ./lcov.info
# Specify whether the Codecov output should be verbose
verbose: true
fail_ci_if_error: true