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 @@ -52,28 +52,17 @@ jobs:
5252 path : ~/.sonar/cache
5353 key : ${{ runner.os }}-sonar
5454 restore-keys : ${{ runner.os }}-sonar
55- - name : Cache SonarCloud scanner
56- id : cache-sonar-scanner
57- uses : actions/cache@v4
58- with :
59- path : ./.sonar/scanner
60- key : ${{ runner.os }}-sonar-scanner
61- restore-keys : ${{ runner.os }}-sonar-scanner
6255 - name : Install SonarCloud scanner
63- if : steps.cache-sonar-scanner.outputs.cache-hit != 'true'
64- shell : pwsh
65- run : |
66- New-Item -Path ./.sonar/scanner -ItemType Directory
67- dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner
56+ run : dotnet tool install dotnet-sonarscanner --create-manifest-if-needed
6857 - name : Build and analyze
6958 env :
7059 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
7160 CollectCoverage : true
7261 CoverletOutputFormat : ' opencover' # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682
7362 shell : pwsh
7463 run : |
75- ./.sonar/scanner/ dotnet-sonarscanner begin /k:"microsoft_OpenAPI.NET" /o:"microsoft" /d:sonar.login ="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="test/**/coverage.opencover.xml"
64+ dotnet tool run dotnet -sonarscanner begin /k:"microsoft_OpenAPI.NET" /o:"microsoft" /d:sonar.token ="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="test/**/coverage.opencover.xml"
7665 dotnet workload restore
7766 dotnet build
7867 dotnet test Microsoft.OpenApi.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
79- ./.sonar/scanner/ dotnet-sonarscanner end /d:sonar.login ="${{ secrets.SONAR_TOKEN }}"
68+ dotnet tool run dotnet -sonarscanner end /d:sonar.token ="${{ secrets.SONAR_TOKEN }}"
You can’t perform that action at this time.
0 commit comments