Skip to content

Commit 54fbafd

Browse files
fix: preserve directory structure in Python coverage artifact upload
When using a glob pattern like 'src/**/coverage.xml', upload-artifact strips the leading directory structure. This causes the coverage files to be uploaded without the 'src/' prefix, so when SonarCloud looks for 'src/eventcatalogasyncapiimporter/coverage.xml', the file isn't there. Fixed by explicitly listing each coverage.xml file path to preserve the full directory structure.
1 parent f69fc2e commit 54fbafd

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/stage-2-test.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ jobs:
101101
uses: actions/upload-artifact@v4
102102
with:
103103
name: python-coverage-reports
104-
path: "src/**/coverage.xml"
104+
path: |
105+
src/asyncapigenerator/coverage.xml
106+
src/cloudeventjekylldocs/coverage.xml
107+
src/eventcatalogasyncapiimporter/coverage.xml
105108
test-lint:
106109
name: "Linting"
107110
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)