@@ -294,49 +294,3 @@ jobs:
294294
295295 - name : Check import contracts
296296 run : lint-imports
297-
298- # ============================================================================
299- # SonarCloud Quality Gate
300- # Evidence: Complexity/duplication metrics correlate with defect density
301- # ============================================================================
302- sonarcloud :
303- name : SonarCloud Analysis
304- runs-on : ubuntu-latest
305- needs : test
306- if : github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
307-
308- steps :
309- - uses : actions/checkout@v6
310- with :
311- fetch-depth : 0
312-
313- - name : Download coverage reports
314- uses : actions/download-artifact@v7
315- with :
316- name : coverage-report
317- path : .
318-
319- - name : Verify coverage files exist
320- run : |
321- echo "=== Checking for coverage files ==="
322- ls -lh coverage.xml test-results.xml || true
323- echo "=== Coverage.xml source paths ==="
324- head -10 coverage.xml || true
325-
326- - name : Create sonar-project.properties
327- run : |
328- cat > sonar-project.properties <<EOF
329- sonar.projectKey=nikolay-e_treemapper
330- sonar.organization=nikolay-e
331- sonar.sources=src/treemapper
332- sonar.tests=tests
333- sonar.python.coverage.reportPaths=coverage.xml
334- sonar.python.xunit.reportPath=test-results.xml
335- sonar.python.version=3.10,3.11,3.12,3.13
336- EOF
337-
338- - name : SonarCloud Scan
339- uses : SonarSource/sonarcloud-github-action@ba3875ecf642b2129de2b589510c81a8b53dbf4e # master
340- env :
341- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
342- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
0 commit comments