-
-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (36 loc) · 991 Bytes
/
Copy pathtest.yml
File metadata and controls
42 lines (36 loc) · 991 Bytes
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
name: Execute tests
on:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
pr:
name: Run tests with coverage
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v5
- name: Execute tests
run: cargo test --all-features
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-Cinstrument-coverage"
LLVM_PROFILE_FILE: "target/coverage/%p-%m.profraw"
- name: Generate coverage report
run: |
rustup component add llvm-tools-preview
cargo install grcov
grcov . \
--binary-path target/debug/ \
-s . \
-t lcov \
--branch \
--ignore-not-existing \
-o target/lcov.info
- name: Codecov
uses: codecov/codecov-action@v6
with:
files: target/lcov.info
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}