forked from nextest-rs/nextest
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.59 KB
/
coverage.yml
File metadata and controls
52 lines (48 loc) · 1.59 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
on:
push:
branches: [main, auto, canary]
pull_request:
branches:
- main
name: Test coverage
jobs:
coverage:
name: Collect test coverage
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
# nightly rust might break from time to time
continue-on-error: true
env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
# Nightly Rust is used for cargo llvm-cov --doc below.
- uses: dtolnay/rust-toolchain@nightly
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
- name: Install latest nextest release
uses: taiki-e/install-action@61e5998d108b2b55a81b9b386c18bd46e4237e4f # v2
with:
tool: nextest
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@61e5998d108b2b55a81b9b386c18bd46e4237e4f # v2
with:
tool: cargo-llvm-cov
- name: Collect coverage data
# Generate separate reports for nextest and doctests, and combine them.
run: |
cargo llvm-cov --no-report nextest
cargo llvm-cov --no-report --doc
cargo llvm-cov report --doctests --lcov --output-path lcov.info
- name: Upload coverage data to codecov
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info