-
Notifications
You must be signed in to change notification settings - Fork 56
47 lines (39 loc) · 1.13 KB
/
coverage.yaml
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
47
name: Coverage
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
path:
- '**/*.rs'
- '**/*.txt'
- '**/Cargo.toml'
- '**/Cargo.lock'
- 'codecov.yml'
- '.github/workflows/coverage.yml'
jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: full
steps:
- uses: actions/[email protected]
with:
persist-credentials: false
- uses: actions-rs/[email protected]
with:
toolchain: stable
override: true
profile: minimal
components: llvm-tools-preview
- name: Install cargo-llvm-cov cargo command
run: cargo install cargo-llvm-cov
- name: Run tests
run: cargo llvm-cov --lcov --no-report --ignore-filename-regex '.*(tests).*|benches.rs|gencode|helpers.rs'
- name: Generate coverage report
run: cargo llvm-cov report --lcov --ignore-filename-regex '.*(tests).*|benches.rs|gencode|helpers.rs' --output-path lcov.info
- name: Upload coverage report to Codecov
uses: codecov/[email protected]