-
Notifications
You must be signed in to change notification settings - Fork 537
34 lines (32 loc) · 1.12 KB
/
codecov.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
name: codecov
env:
# It's really `--all-features`, but not adding the mutually exclusive features from rkyv
ALL_NON_EXCLUSIVE_FEATURES: --features "default unstable-locales rkyv-64 rkyv-validation serde arbitrary"
on:
push:
branches: [main, 0.5.x]
pull_request:
jobs:
# Run code coverage using cargo-llvm-cov then upload to codecov.io
job_code_coverage:
name: llvm-cov
runs-on: ubuntu-latest
environment: Coverage
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
# nightly is required for --doctests, see cargo-llvm-cov#2
- name: Install Rust (nightly)
run: rustup update nightly
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo +nightly llvm-cov ${{ env.ALL_NON_EXCLUSIVE_FEATURES }} --workspace --lcov --doctests --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info
fail_ci_if_error: true