Skip to content

Commit

Permalink
Update featurebuild.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Xhaguatende committed Apr 30, 2024
1 parent 8ab5d2e commit d2f2a30
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/featurebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ jobs:
- name: Restore dependencies
run: dotnet restore

- name: Install SonarCloud
run: dotnet tool install --global dotnet-sonarscanner

- name: Begin SonarCloud Scan
run: |
dotnet sonarscanner begin /o:"${{ secrets.SONAR_CLOUD_ORGANIZATION }}" \
/k:"${{ env.SONAR_CLOUD_PROJECT_KEY }}" \
/v:"${{ steps.gitversion.outputs.nuGetVersionV2 }}" \
/d:sonar.host.url="${{ secrets.SONAR_CLOUD_URL }}" \
/d:sonar.login="${{ secrets.SONAR_TOKEN }}" \
/d:sonar.cs.opencover.reportsPaths=./CoverageResults/coverage.opencover.xml \
/d:sonar.coverage.exclusions="**Test*.cs" \
/d:sonar.qualitygate.wait=true
- name: Build
run: dotnet build --no-restore --configuration ${{ env.BUILD_CONFIGURATION }} -p:GeneratePackageOnBuild=false

Expand All @@ -72,7 +58,14 @@ jobs:
/p:CoverletOutputFormat=\"opencover,json\" \
-m:1
- name: End SonarCloud Scan
run: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
- name: SonarCloud Analysis
uses: SonarSource/[email protected]
with:
args: >
-Dsonar.organization=${{ secrets.SONAR_CLOUD_ORGANIZATION }}
-Dsonar.projectKey=${{ env.SONAR_CLOUD_PROJECT_KEY }}
-Dsonar.cs.opencover.reportsPaths=./CoverageResults/coverage.opencover.xml
-Dsonar.coverage.exclusions="**Test*.cs"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 comments on commit d2f2a30

Please sign in to comment.