File tree Expand file tree Collapse file tree 1 file changed +40
-7
lines changed Expand file tree Collapse file tree 1 file changed +40
-7
lines changed Original file line number Diff line number Diff line change 1+ ---
12name : Coverage
23
3- on : [pull_request, push]
4+ on : # yamllint disable-line rule:truthy
5+ push :
6+ branches : ["main"]
7+ pull_request :
8+ # The branches below must be a subset of the branches above
9+ branches : ["main"]
10+ workflow_dispatch :
411
512jobs :
613 coverage :
@@ -14,10 +21,36 @@ jobs:
1421 - name : Install cargo-llvm-cov
1522 uses : taiki-e/install-action@cargo-llvm-cov
1623 - name : Generate code coverage
17- run : cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
18- - name : Upload coverage to Codecov
19- uses : codecov/codecov-action@v3
24+ run : >
25+ cargo llvm-cov
26+ --all-features
27+ --workspace
28+ --lcov
29+ --output-path lcov.info
30+ - name : Upload coverage artifact
31+ uses : actions/upload-artifact@v4
2032 with :
21- token : ${{ secrets.CODECOV_TOKEN }} # not required for public repos
22- files : lcov.info
23- fail_ci_if_error : true
33+ name : coverage-report
34+ path : lcov.info
35+
36+ codecov :
37+ name : Upload to Codecov
38+ runs-on : ubuntu-24.04
39+ needs : coverage
40+
41+ steps :
42+ - name : Checkout repository
43+ uses : actions/checkout@v5
44+ with :
45+ fetch-depth : 0
46+ - name : Download coverage artifact
47+ uses : actions/download-artifact@v5
48+ with :
49+ name : coverage-report
50+
51+ - name : Upload coverage reports to Codecov with GitHub Action
52+ uses : codecov/codecov-action@v5
53+ with :
54+ files : coverage.out
55+ token : ${{ secrets.CODECOV_TOKEN }} # required
56+ verbose : true # optional (default = false)
You can’t perform that action at this time.
0 commit comments