-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (40 loc) · 1.29 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
49
name: Coverage
on: [push]
env:
CARGO_TERM_COLOR: always
jobs:
coverage:
name: Test Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Get date
run: |
echo "TODAY_DATE=$(date -Idate)" >> "$GITHUB_ENV"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Toolchain
uses: actions/cache@v4
with:
path: ~/.rustup
key: toolchain-x86-64-nightly-${{ env.TODAY_DATE }}
- name: Install `nightly` Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt,clippy,llvm-tools-preview
- name: Install cargo-llvm-cov
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-llvm-cov
- name: Generate Coverage
run: |
cargo run --example build-float-doctest-tree --features="rkyv"
cargo run --example build-immutable-doctest-tree --features="rkyv"
cargo llvm-cov --all-features --tests --ignore-run-fail --workspace --codecov --output-path codecov.json
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: codecov.json