-
Notifications
You must be signed in to change notification settings - Fork 84
48 lines (42 loc) · 1.24 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
40
41
42
43
44
45
46
47
48
name: Coverage
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
coverage:
strategy: # allows pinning additional nightly
fail-fast: false # allows continue past failure of one toolchain if multiple
matrix:
toolchain: [ nightly ]
# 360 mins is gh actions default
timeout-minutes: ${{ matrix.toolchain == 'nightly' && 10 || 360 }}
name: Coverage
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: llvm-tools-preview
- uses: taiki-e/install-action@v2
with:
tool: nextest
- uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Collect coverage
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 to codecov.io
uses: codecov/codecov-action@v4
with:
files: lcov.info
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: false