[sonar] Add initial Sonar Scan setup

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
This commit is contained in:
Julian Strobl 2023-04-04 11:03:17 +02:00
parent e69742808f
commit 3b4dcac388
No known key found for this signature in database
GPG Key ID: E0A8F9AD733499A7
2 changed files with 24 additions and 0 deletions

22
.github/workflows/sonar.yaml vendored Normal file
View File

@ -0,0 +1,22 @@
---
name: Sonar Scan
on:
push:
branches:
- main
jobs:
build:
name: Sonar Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

2
sonar-project.properties Normal file
View File

@ -0,0 +1,2 @@
sonar.projectKey=planetmint_planetmint_AYdLgEyUjRMsrlXgCln1
sonar.python.version=3.9