Skip to content

Commit ba82627

Browse files
authored
Merge pull request #381 from vil02/migrate_to_sonarqube-scan-action
chore: migrate to `sonarqube-scan-action`
2 parents e4b56da + 08fc9d9 commit ba82627

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

.github/workflows/generate_and_upload_coverage_data.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,10 @@ jobs:
5050
poetry run coverage html --omit="tests/*"
5151
poetry run coverage report --omit="tests/*"
5252
53-
- name: Fix code coverage paths for SonarCloud
54-
# yamllint disable rule:line-length
55-
run: |
56-
cp coverage.xml coverage_for_sonarcloud.xml
57-
sed -i 's/\/home\/runner\/work\/string_to_code_proj\/string_to_code_proj/\/github\/workspace/g' coverage_for_sonarcloud.xml
58-
# yamllint enable rule:line-length
59-
60-
- name: SonarCloud Scan
61-
uses: SonarSource/sonarcloud-github-action@v4
53+
- name: Sonar Scan
54+
uses: SonarSource/sonarqube-scan-action@v4
6255
env:
63-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
6457
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6558

6659
- name: Upload coverage report to Codecov

sonar-project.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
sonar.projectKey=vil02_string_to_code_proj
22
sonar.organization=vil02
33

4-
sonar.exclusions=coverage_for_sonarcloud.xml,tests/example_data/java/**,tests/example_data/python3/**
4+
sonar.exclusions=coverage.xml,tests/example_data/java/**,tests/example_data/python3/**
55
sonar.coverage.exclusions=tests/**,examples/**
6-
sonar.python.coverage.reportPaths=coverage_for_sonarcloud.xml
6+
sonar.python.coverage.reportPaths=coverage.xml
77
sonar.python.version=3.10, 3.11
88

99
sonar.cpp.file.suffixes=-

0 commit comments

Comments
 (0)