Skip to content

Commit a9a804c

Browse files
author
WangGLJoseph
committed
abort Sonarqube Scan if coverage.xml is missing
1 parent 6719301 commit a9a804c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/pytest.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ jobs:
4343
- name: Run tox tests
4444
run: tox -e py
4545

46+
- name: Check Coverage Report Exists
47+
run: |
48+
if [ ! -f coverage.xml ]; then
49+
echo "coverage.xml not found! Aborting SonarQube scan."
50+
exit 1
51+
fi
52+
4653
- name: SonarQube Scan
4754
uses: SonarSource/sonarqube-scan-action@v4
4855
env:

sonar-project.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ sonar.exclusions=conf/**, demo_vis/**, results/**, scripts/**
22
sonar.organization=autocoderoversg
33
sonar.projectKey=AutoCodeRoverSG_auto-code-rover
44
sonar.python.coverage.reportPaths=coverage.xml
5-
sonar.tests=test/
65
sonar.verbose=true

0 commit comments

Comments
 (0)