diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 50cbd4c..9b3b312 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 }} + 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