-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (56 loc) · 1.53 KB
/
coverage.yml
File metadata and controls
61 lines (56 loc) · 1.53 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Code Coverage
on:
push:
branches:
- master
paths:
- 'matcher_rs/src/**'
- 'matcher_rs/tests/**'
- 'matcher_rs/process_map/**'
- 'matcher_rs/Cargo.toml'
- '.github/workflows/coverage.yml'
- 'Cargo.toml'
pull_request:
paths:
- 'matcher_rs/src/**'
- 'matcher_rs/tests/**'
- 'matcher_rs/process_map/**'
- 'matcher_rs/Cargo.toml'
- '.github/workflows/coverage.yml'
- 'Cargo.toml'
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install tarpaulin
uses: taiki-e/install-action@cargo-tarpaulin
- name: Generate code coverage
run: >
cargo tarpaulin -p matcher_rs --fail-under 75 --out xml
--exclude-files 'matcher_rs/benches/*'
--exclude-files 'matcher_rs/examples/*'
--exclude-files 'matcher_py/*'
--exclude-files 'matcher_java/*'
--exclude-files 'matcher_c/*'
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
file: ./cobertura.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}