@@ -251,40 +251,44 @@ jobs:
251251 name : coverage-pytest-integrative-4
252252 path : .coverage*
253253
254- coverage-merge :
255- runs-on : ubuntu-24.04
256- needs : [pytest-unit, pytest-integrative-1, pytest-integrative-2, pytest-integrative-3, pytest-integrative-4]
257- steps :
258- - uses : actions/checkout@v3
259- - name : Set up Python
260- uses : actions/setup-python@v4
261- with :
262- python-version : " 3.9"
263-
264- - name : Install coverage
265- run : pip install coverage
266-
267- - name : Download all coverage artifacts
268- uses : actions/download-artifact@v4
269- with :
270- path : coverage-reports
271-
272- - name : Merge coverage reports
273- run : |
274- cd coverage-reports
275- # Move all .coverage files to current directory
276- find . -name ".coverage*" -exec cp {} . \;
277- cd ..
278- # Combine all coverage files
279- coverage combine coverage-reports/.coverage*
280- # Generate XML report for codecov
281- coverage xml
282-
283- - name : Upload merged coverage to Codecov
284- uses : codecov/codecov-action@v4
285- with :
286- files : ./coverage.xml
287- flags : unittests
288- name : codecov-umbrella
289- env :
290- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
254+ coverage-merge :
255+ runs-on : ubuntu-24.04
256+ needs : [pytest-unit, pytest-integrative-1, pytest-integrative-2, pytest-integrative-3, pytest-integrative-4]
257+ steps :
258+ - uses : actions/checkout@v3
259+ - name : Set up Python
260+ uses : actions/setup-python@v4
261+ with :
262+ python-version : " 3.9"
263+
264+ - name : Install coverage
265+ run : pip install coverage
266+
267+ - name : Download all coverage artifacts
268+ uses : actions/download-artifact@v5
269+ with :
270+ path : coverage-reports
271+
272+ - name : Merge coverage reports
273+ run : |
274+ # List directory structure for debugging
275+ ls -la
276+ ls -la coverage-reports/ || echo "coverage-reports directory not found"
277+
278+ # Find and combine all coverage files
279+ find coverage-reports -name ".coverage*" -type f
280+
281+ # Combine all coverage files
282+ coverage combine coverage-reports/**/.coverage*
283+
284+ # Generate XML report for codecov
285+ coverage xml
286+
287+ - name : Upload merged coverage to Codecov
288+ uses : codecov/codecov-action@v4
289+ with :
290+ files : ./coverage.xml
291+ flags : unittests
292+ name : codecov-umbrella
293+ env :
294+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
0 commit comments