Skip to content

Commit

Permalink
Setup sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
Honny1 committed Mar 27, 2024
1 parent 3424a9e commit fae5c5e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

pubish:
runs-on: ubuntu-latest
needs: [welcome, build, test]
needs: [welcome, build, test, sonarcloud]
steps:
- uses: actions/checkout@v4

Expand All @@ -60,3 +60,17 @@ jobs:

- name: Test
run: dotnet publish

sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
needs: welcome
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 }}
13 changes: 13 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sonar.projectKey=Honny1_ActionsKata
sonar.organization=honny1

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=ActionsKata
#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

0 comments on commit fae5c5e

Please sign in to comment.