-
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.15 KB
/
coverage.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
35
36
37
38
39
on:
push:
branches: [ main ]
pull_request:
branches:
- main
name: Test coverage
jobs:
coverage:
name: Collect test coverage
runs-on: ubuntu-latest
env:
# The `coverage_nightly` cfg value is not recognized, so we need to allow unknown
# cfg values in order to have the build succeed.
RUSTFLAGS: -D warnings -A unexpected_cfgs
CARGO_TERM_COLOR: always
steps:
- uses: dtolnay/rust-toolchain@nightly
with:
components: llvm-tools-preview
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@nextest
- uses: taiki-e/install-action@cargo-llvm-cov
- name: Collect coverage data
# Generate coverage report using nextest.
run: |
cargo llvm-cov --no-report nextest --all-features
cargo llvm-cov --no-report --doc --all-features
cargo llvm-cov report --doctests --lcov --output-path lcov.info
- name: Upload coverage data to codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info