File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -55,27 +55,16 @@ jobs:
5555 path : ~/.sonar/cache
5656 key : ${{ runner.os }}-sonar
5757 restore-keys : ${{ runner.os }}-sonar
58- - name : Cache SonarCloud scanner
59- id : cache-sonar-scanner
60- uses : actions/cache@v4
61- with :
62- path : ./.sonar/scanner
63- key : ${{ runner.os }}-sonar-scanner
64- restore-keys : ${{ runner.os }}-sonar-scanner
6558 - name : Install SonarCloud scanner
66- if : steps.cache-sonar-scanner.outputs.cache-hit != 'true'
67- shell : pwsh
68- run : |
69- New-Item -Path ./.sonar/scanner -ItemType Directory
70- dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner
59+ run : dotnet tool install dotnet-sonarscanner --create-manifest-if-needed
7160 - name : Build and analyze
7261 env :
7362 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
7463 CollectCoverage : true
7564 CoverletOutputFormat : " opencover" # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682
7665 shell : pwsh
7766 run : |
78- ./.sonar/scanner/ dotnet-sonarscanner begin /k:"microsoft_OpenApi.ApiManifest" /o:"microsoft" /d:sonar.login ="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="tests/**/coverage.opencover.xml"
67+ dotnet tool run dotnet -sonarscanner begin /k:"microsoft_OpenApi.ApiManifest" /o:"microsoft" /d:sonar.token ="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="tests/**/coverage.opencover.xml"
7968 dotnet build
8069 dotnet test apimanifest.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
81- ./.sonar/scanner/ dotnet-sonarscanner end /d:sonar.login ="${{ secrets.SONAR_TOKEN }}"
70+ dotnet tool run dotnet -sonarscanner end /d:sonar.token ="${{ secrets.SONAR_TOKEN }}"
You can’t perform that action at this time.
0 commit comments