File tree Expand file tree Collapse file tree 3 files changed +60
-6
lines changed
Expand file tree Collapse file tree 3 files changed +60
-6
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+ report :
13+ name : Generate 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 clean
48+ cargo llvm-cov --all-features --workspace --codecov --output-path ./codecov.json
49+
50+ - id : upload
51+ name : Upload Coverage Report
52+ uses : codecov/codecov-action@v5
53+ with :
54+ verbose : true
55+ token : ${{ secrets.CODECOV_TOKEN }}
56+ files : ${{ github.workspace }}/codecov.json
57+ fail_ci_if_error : true
Original file line number Diff line number Diff line change 1- name : Generate Coverage Report
1+ name : 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 1- name : Upload Coverage Report
1+ name : Upload Coverage Report (PR)
22
33on :
44 # This workflow is triggered after every successfull execution
55 # of `Generate Coverage Report` workflow.
66 workflow_run :
7- workflows : ["Generate Coverage Report"]
7+ workflows : ["Generate Coverage Report (PR) "]
88 types :
99 - completed
1010
You can’t perform that action at this time.
0 commit comments