From 498bfc1f30e538e9fd42e176d8fceea6864b245a Mon Sep 17 00:00:00 2001 From: CodyKoInABox Date: Sun, 25 May 2025 01:53:26 -0300 Subject: [PATCH 1/3] sonarqube config file --- sonar-project.properties | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..9be9a79 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,14 @@ +sonar.projectKey=spicecodecli_spicecode +sonar.organization=spicecodecli + + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=spicecode +#sonar.projectVersion=1.0 + + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +#sonar.sources=. + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8 \ No newline at end of file From 5df938118583ccf8e825a24ee7079fedea050412 Mon Sep 17 00:00:00 2001 From: CodyKoInABox Date: Sun, 25 May 2025 01:54:13 -0300 Subject: [PATCH 2/3] run sonarqube after tests --- .github/workflows/run_tests.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 50cbd4c..5776414 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -35,4 +35,12 @@ jobs: --cov-report=term-missing \ --cov-report=xml # <-- this line generates coverage.xml + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@v2 + with: + args: > + -Dsonar.python.coverage.reportPaths=coverage.xml + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + From 7d8bcbd530369b4c4181624217a84d53185623a1 Mon Sep 17 00:00:00 2001 From: CodyKoInABox Date: Sun, 25 May 2025 02:02:02 -0300 Subject: [PATCH 3/3] disable automatic analysis for workflow to work --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 5776414..9b3b312 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -41,6 +41,6 @@ jobs: args: > -Dsonar.python.coverage.reportPaths=coverage.xml env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}