Skip to content

Commit

Permalink
Add sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
Aymen TROUDI authored and Aymen TROUDI committed Aug 8, 2023
1 parent a93b65d commit 88b42e3
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
Expand All @@ -29,3 +29,28 @@ jobs:
PACKAGE_NAME: CertificateCli
PROJECT_FILE_PATH: src/App/App.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
sonar:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: SonarCloud Scan
uses: highbyte/sonarscan-dotnet@v2.2.1
with:
sonarProjectName: CertificateCli
sonarProjectKey: CertificateCli-Key
sonarOrganization: aimenux-sonar-cloud-key
dotnetTestArguments: -f net7.0 --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
sonarBeginArguments: /d:sonar.cs.opencover.reportsPaths="**/**/TestResults/**/coverage.opencover.xml"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 comments on commit 88b42e3

Please sign in to comment.