Skip to content

Commit bd2d932

Browse files
committed
AI attempt №2
1 parent bdb5a4d commit bd2d932

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/unstable-cicd.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,20 @@ jobs:
9696
from pathlib import Path
9797
import os
9898
99-
coverage = Path("coverage.xml")
100-
content = coverage.read_text(encoding="utf-8")
99+
source_report = Path("coverage.xml")
100+
sonar_report = Path("coverage-sonar.xml")
101+
content = source_report.read_text(encoding="utf-8")
101102
normalized = content.replace("/github/workspace", os.environ["GITHUB_WORKSPACE"])
102-
103-
if normalized != content:
104-
coverage.write_text(normalized, encoding="utf-8")
105-
print(f"Updated coverage.xml source paths to {os.environ['GITHUB_WORKSPACE']}")
106-
else:
107-
print("No /github/workspace path entries found in coverage.xml")
103+
sonar_report.write_text(normalized, encoding="utf-8")
104+
print(f"Wrote Sonar-ready coverage report to {sonar_report}")
108105
PY
109106
110107
-
111108
name: 🛏️ Upload Coverage
112109
uses: SonarSource/sonarqube-scan-action@v6
110+
with:
111+
args: >
112+
-Dsonar.python.coverage.reportPaths=coverage-sonar.xml
113113
env:
114114
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
115115

0 commit comments

Comments
 (0)