[sonar] Add initial setup

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
This commit is contained in:
Julian Strobl 2023-06-23 10:06:48 +02:00 committed by Lorenz Herzberger
parent 0681f4ebc2
commit 58d6352c68
No known key found for this signature in database
GPG Key ID: FA5EE906EB55316A
2 changed files with 30 additions and 0 deletions

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

@ -0,0 +1,29 @@
---
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 }}
- uses: sonarsource/sonarqube-quality-gate-action@master
# Force to fail step after specific time.
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

1
sonar-project.properties Normal file
View File

@ -0,0 +1 @@
sonar.projectKey=planetmint_planetmint-go_AYjnSLNdwwdSy162QoXI