-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (36 loc) · 1.01 KB
/
coverage.yml
File metadata and controls
37 lines (36 loc) · 1.01 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
name: Publish Project Coverage to Codecov
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
coverage:
runs-on: macos-latest
env:
PYO3_PYTHON: "/opt/homebrew/opt/python@3.12/bin/python3.12"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Homebrew dependencies
run: brew install python@3.12 just llvm nettle pkg-config
- name: Restore Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Generate coverage
run: just coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: coverage/lcov.info
flags: rust
name: rust-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}