This repository was archived by the owner on Aug 29, 2025. It is now read-only.
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 @@ -51,28 +51,17 @@ jobs:
5151 path : ~/.sonar/cache
5252 key : ${{ runner.os }}-sonar
5353 restore-keys : ${{ runner.os }}-sonar
54- - name : Cache SonarCloud scanner
55- id : cache-sonar-scanner
56- uses : actions/cache@v4
57- with :
58- path : ./.sonar/scanner
59- key : ${{ runner.os }}-sonar-scanner
60- restore-keys : ${{ runner.os }}-sonar-scanner
6154 - name : Install SonarCloud scanner
62- if : steps.cache-sonar-scanner.outputs.cache-hit != 'true'
63- shell : pwsh
64- run : |
65- New-Item -Path ./.sonar/scanner -ItemType Directory
66- dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner
55+ run : dotnet tool install dotnet-sonarscanner --create-manifest-if-needed
6756 - name : Build and analyze
6857 env :
6958 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
7059 CollectCoverage : true
7160 CoverletOutputFormat : ' opencover' # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682
7261 shell : pwsh
7362 run : |
74- ./.sonar/scanner/ dotnet-sonarscanner begin /k:"microsoftgraph_msgraph-cli-core" /o:"microsoftgraph2" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="**/*.Tests/**/coverage.opencover.xml" /d:sonar.coverage.exclusions="src/sample/**"
63+ dotnet tool run dotnet-sonarscanner begin /k:"microsoftgraph_msgraph-cli-core" /o:"microsoftgraph2" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="**/*.Tests/**/coverage.opencover.xml" /d:sonar.coverage.exclusions="src/sample/**"
7564 dotnet workload restore
7665 dotnet build
7766 dotnet test msgraph-cli-core.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
78- ./.sonar/scanner/ dotnet-sonarscanner end
67+ dotnet tool run dotnet -sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
You can’t perform that action at this time.
0 commit comments