Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/sonar_python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,26 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check for Python files
id: check_py
run: |
if git ls-files "*.py" | grep -q "."; then
echo "Python files found"
echo "found=true" >> "$GITHUB_OUTPUT"
else
echo "No Python files found"
echo "found=false" >> "$GITHUB_OUTPUT"
fi

- name: Download coverage report
if: steps.check_py.outputs.found == 'true'
uses: actions/download-artifact@v4
with:
name: coverage-report

- name: SonarQube Scan
if: steps.check_py.outputs.found == 'true'
uses: SonarSource/sonarqube-scan-action@v5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
Loading