From eb2a3de7d517cae7abd8adedf61a35128ee8f452 Mon Sep 17 00:00:00 2001 From: Roy Rutishauser Date: Tue, 28 Feb 2023 11:13:59 +0100 Subject: [PATCH] basic setup for sonarcloud --- .github/workflows/main.yml | 13 +++++++++++++ sonar-project.properties | 12 ++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 sonar-project.properties diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d137ea9..17ae54d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,6 +9,19 @@ on: workflow_dispatch: jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + deploy: name: Deploying to Google Cloud runs-on: ubuntu-latest diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..a510936 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,12 @@ +sonar.projectKey=TODO +sonar.organization=TODO + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=client +#sonar.projectVersion=1.0 + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +sonar.sources=./src + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8 \ No newline at end of file