-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.31 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
43
name: Coverage
on: [pull_request, push]
jobs:
coverage:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v3
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: clippy
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
# generate code coverage
- name: Generate scanner code coverage
run: cargo llvm-cov test scanner --ignore-filename-regex "parsers|main" --all-features --workspace --lcov --output-path scanner.info
- name: Generate parsers code coverage
run: cargo llvm-cov test parsers --ignore-filename-regex "scanner|main" --all-features --workspace --lcov --output-path parsers.info
# add further generation here
# upload test stats to codecov.io
- name: Upload scanner coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: scanner
files: scanner.info
fail_ci_if_error: true
verbose: true
- name: Upload parser coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: parser
files: parsers.info
fail_ci_if_error: true
verbose: true