Skip to content

Commit b2f1cf1

Browse files
committed
Move coverage reports to root directory for Codecov upload
This commit updates the `test.yml` GitHub workflow to correctly process and locate code coverage reports before uploading them to Codecov. The previous steps extracted coverage reports from `.tar` and `.zip` archives into subdirectories within the `coverage-reports` directory. This commit adds a step to move all extracted `.xml` files from these subdirectories into the root of the `coverage-reports` directory. Additionally, it cleans up the original `.tar` and `.zip` archives after extraction to save space. This ensures that the Codecov action can find all the necessary XML reports in the expected location.
1 parent 2c7887f commit b2f1cf1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ jobs:
301301
run: |
302302
find coverage-reports -type f -name "*.tar" -exec tar -xf {} -C coverage-reports \;
303303
find coverage-reports -type f -name "*.zip" -exec unzip -o {} -d coverage-reports \;
304+
find coverage-reports -name "*.xml" -type f -exec mv {} coverage-reports/ \;
305+
find coverage-reports -type f \( -name "*.tar" -o -name "*.zip" \) -delete
304306
find coverage-reports -name "*.xml" -type f
305307
306308
- name: Upload to codecov.io

0 commit comments

Comments
 (0)