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,28 +55,17 @@ jobs:
55
55
path : ~/.sonar/cache
56
56
key : ${{ runner.os }}-sonar
57
57
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
65
58
- 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
71
60
- name : Build and analyze
72
61
env :
73
62
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
74
63
CollectCoverage : true
75
64
CoverletOutputFormat : ' opencover' # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682
76
65
shell : pwsh
77
66
run : |
78
- ./.sonar/scanner/ dotnet-sonarscanner begin /k:"microsoft_OpenAPI.NET.OData" /o:"microsoft" /d:sonar.login ="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="test/**/coverage.net7.0.opencover.xml"
67
+ dotnet tool run dotnet -sonarscanner begin /k:"microsoft_OpenAPI.NET.OData" /o:"microsoft" /d:sonar.token ="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="test/**/coverage.net7.0.opencover.xml"
79
68
dotnet workload restore
80
69
dotnet build
81
70
dotnet test Microsoft.OpenApi.OData.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
82
- ./.sonar/scanner/ dotnet-sonarscanner end /d:sonar.login ="${{ secrets.SONAR_TOKEN }}"
71
+ dotnet tool run dotnet -sonarscanner end /d:sonar.token ="${{ secrets.SONAR_TOKEN }}"
You can’t perform that action at this time.
0 commit comments