Skip to content

Commit 53e3577

Browse files
authored
Update codecov according to the documentation (#463)
1 parent dd6edbe commit 53e3577

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,30 @@ jobs:
8585
URSIM_VERSION: ${{matrix.env.URSIM_VERSION}}
8686
- name: Upload test results to Codecov
8787
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
88-
uses: codecov/test-results-action@v1
88+
uses: codecov/codecov-action@v5
8989
with:
90-
token: ${{ secrets.CODECOV_TOKEN }}
9190
fail_ci_if_error: true
91+
files: build/junit.xml
92+
report_type: test_results
93+
env:
94+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
9295
- name: run examples
9396
run: ./run_examples.sh "192.168.56.101" 1
9497
- name: install gcovr
9598
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
9699
run: sudo apt-get install -y gcovr
97100
- name: gcovr
98101
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
99-
run: cd build && gcovr -r .. --gcov-ignore-parse-errors negative_hits.warn_once_per_file --exclude "../3rdparty"
100-
- name: Upload coverage to Codecov
102+
run: cd build && gcovr -r .. --xml coverage.xml --gcov-ignore-parse-errors negative_hits.warn_once_per_file --exclude "../3rdparty"
103+
- name: Upload coverage reports to Codecov with GitHub Action
101104
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
102105
uses: codecov/codecov-action@v5
103106
with:
104107
fail_ci_if_error: true
105-
token: ${{ secrets.CODECOV_TOKEN }}
108+
files: build/coverage.xml
106109
flags: ${{ matrix.env.ROBOT_MODEL }}-${{ matrix.env.URSIM_VERSION }}
110+
env:
111+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
107112
- name: Generate URSim log files
108113
if: ${{ always() && steps.check_polyscopex.outputs.is_polyscopex == 'false' }}
109114
run: |
@@ -154,9 +159,10 @@ jobs:
154159
env:
155160
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
156161
run: bundle exec bashcov --skip-uncovered bats tests/test_start_ursim.bats
157-
- name: Upload reports to Codecov
162+
- name: Upload coverage reports to Codecov with GitHub Action
158163
uses: codecov/codecov-action@v5
159164
with:
160165
fail_ci_if_error: true
161-
token: ${{ secrets.CODECOV_TOKEN }}
162166
flags: start_ursim
167+
env:
168+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)