-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (48 loc) · 1.37 KB
/
coverage.yml
File metadata and controls
58 lines (48 loc) · 1.37 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
name: Coverage
on:
push:
branches: [main]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- name: Install cargo-tarpaulin
uses: taiki-e/install-action@cargo-tarpaulin
- name: Generate coverage report
run: |
cargo tarpaulin --features http_client \
--workspace \
--exclude bashkit-python \
--out xml \
--out html \
--output-dir coverage \
--exclude-files "crates/bashkit-bench/*" \
--exclude-files "crates/bashkit-cli/*" \
--exclude-files "crates/bashkit-python/*" \
--timeout 300 \
--skip-clean \
--engine llvm
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
with:
files: coverage/cobertura.xml
flags: unittests
fail_ci_if_error: false
verbose: true
- name: Upload coverage artifacts
uses: actions/upload-artifact@v7
with:
name: coverage-report
path: coverage/
retention-days: 30