Skip to content

Commit 66d31d3

Browse files
authored
ci: update Codecov configuration for test and coverage upload (#580)
ci: update Codecov configuration for test and coverage upload - Unified usage of `codecov/codecov-action@v5` for both test results and coverage upload. - Added `CODECOV_TOKEN` and `report_type` parameters for improved configuration. ## Motivation and Context Actually, CODECOV_TOKEN is required, even though the CodeCov banner previously said the project can upload without a token. ## How Has This Been Tested? CI ## Breaking Changes No ## Types of changes - [x] CI fix ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed
1 parent eb94f14 commit 66d31d3

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,22 +108,21 @@ jobs:
108108
truncate_stack_traces: false
109109

110110
- name: Upload coverage reports to Codecov
111-
if: matrix.os == 'ubuntu-latest'
111+
if: ${{ !cancelled() && matrix.os == 'ubuntu-latest' }}
112112
uses: codecov/codecov-action@v5
113113
with:
114+
token: ${{ secrets.CODECOV_TOKEN }}
115+
report_type: coverage
114116
directory: ./build/reports/kover
115117
files: report.xml
116118

117-
- name: Upload coverage reports to Codecov
119+
- name: Upload test results to Codecov
118120
if: ${{ !cancelled() && matrix.os == 'ubuntu-latest' }}
119121
uses: codecov/codecov-action@v5
120122
with:
121-
directory: ./build/reports/kover
122-
files: report.xml
123+
token: ${{ secrets.CODECOV_TOKEN }}
124+
report_type: test_results
123125

124-
- name: Upload test results to Codecov
125-
if: ${{ !cancelled() && matrix.os == 'ubuntu-latest' }}
126-
uses: codecov/test-results-action@v1
127126

128127
- name: Archive Maven Local Repository
129128
if: ${{ success() && matrix.os == 'ubuntu-latest' }}

0 commit comments

Comments
 (0)