-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (47 loc) · 1.33 KB
/
coverage.yml
File metadata and controls
58 lines (47 loc) · 1.33 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: Publish Project Coverage to Codecov
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
coverage:
runs-on: ubuntu-latest
env:
PYO3_PYTHON: python
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Linux dependencies
run: sudo apt-get update && sudo apt-get install -y pkg-config nettle-dev
- name: Restore Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install just
uses: taiki-e/install-action@v2
with:
tool: just
- name: Install LLVM tools
run: rustup component add llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Generate coverage report
run: just coverage
- name: Upload combined coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: coverage/lcov.info
flags: rust
name: rust-coverage
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}