Skip to content

Commit

Permalink
Use dotnet tool for sonarscanner (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
lg2de authored Dec 9, 2023
1 parent 93a2e09 commit 6029a2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup dotnet-cover
run: dotnet tool install --global dotnet-coverage
- name: Setup SonarScanner
run: choco install "sonarscanner-msbuild-net46" -y
run: dotnet tool install --global dotnet-sonarscanner
- name: Patch version info
run: .\PatchVersion.ps1
shell: pwsh
Expand All @@ -55,12 +55,12 @@ jobs:
$branchCommand="/d:sonar.branch.name=$branch"
}
Write-Host CMDs=$branchCommand
SonarScanner.MSBuild.exe begin /d:"sonar.host.url=https://sonarcloud.io" /o:lg2de /k:lg2de_SimpleAccounting $branchCommand /d:sonar.token=$env:SONAR_TOKEN /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
dotnet sonarscanner begin /d:"sonar.host.url=https://sonarcloud.io" /o:lg2de /k:lg2de_SimpleAccounting $branchCommand /d:sonar.token=$env:SONAR_TOKEN /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
shell: pwsh
- name: Build Debug and Test
run: dotnet-coverage collect "dotnet test" -f xml -o "coverage.xml"
- name: Complete SonarScanner
run: SonarScanner.MSBuild.exe end /d:sonar.login=${{ secrets.SONAR_TOKEN }}
run: dotnet sonarscanner end /d:sonar.login=${{ secrets.SONAR_TOKEN }}

- name: Upload product artifact
uses: actions/upload-artifact@v1
Expand Down

0 comments on commit 6029a2f

Please sign in to comment.