File tree Expand file tree Collapse file tree 3 files changed +57
-4
lines changed
Expand file tree Collapse file tree 3 files changed +57
-4
lines changed Original file line number Diff line number Diff line change 1+ name : Coverage
2+
3+ on :
4+ push :
5+ branches :
6+ - develop
7+
8+ env :
9+ CARGO_TERM_COLOR : always
10+
11+ jobs :
12+ coverage :
13+ name : Generate and Upload Coverage Report
14+ environment : coverage
15+ runs-on : ubuntu-latest
16+ env :
17+ CARGO_INCREMENTAL : " 0"
18+ RUSTFLAGS : " -Cinstrument-coverage"
19+
20+ steps :
21+ - name : Checkout repository
22+ uses : actions/checkout@v4
23+
24+ - name : Install LLVM tools
25+ run : sudo apt-get update && sudo apt-get install -y llvm
26+
27+ - id : setup
28+ name : Setup Toolchain
29+ uses : dtolnay/rust-toolchain@nightly
30+ with :
31+ toolchain : nightly
32+ components : llvm-tools-preview
33+
34+ - id : cache
35+ name : Enable Workflow Cache
36+ uses : Swatinem/rust-cache@v2
37+
38+ - id : tools
39+ name : Install Tools
40+ uses : taiki-e/install-action@v2
41+ with :
42+ tool : grcov,cargo-llvm-cov
43+
44+ - id : coverage
45+ name : Generate Coverage Report
46+ run : |
47+ cargo test
48+ cargo llvm-cov --lcov --output-path=./lcov.info
49+
50+ - name : Upload coverage to Codecov
51+ uses : codecov/codecov-action@v5
52+ with :
53+ verbose : true
54+ token : ${{ secrets.CODECOV_TOKEN }}
55+ files : ${{ github.workspace }}/lcov.info
56+ fail_ci_if_error : true
Original file line number Diff line number Diff line change 11name : Generate Coverage Report (PR)
22
33on :
4- push :
5- branches :
6- - develop
74 pull_request :
85 branches :
96 - develop
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ jobs:
102102 path : repo_root
103103
104104 - name : Upload coverage to Codecov
105- uses : codecov/codecov-action@v4
105+ uses : codecov/codecov-action@v5
106106 with :
107107 verbose : true
108108 token : ${{ secrets.CODECOV_TOKEN }}
You can’t perform that action at this time.
0 commit comments