44 push :
55 branches :
66 - main
7- paths-ignore : [' **.md', ' .vscode/**', ' **.svg' ]
7+ paths-ignore : [" **.md", " .vscode/**", " **.svg" ]
88 pull_request :
99 types : [opened, synchronize, reopened]
10- paths-ignore : [' **.md', ' .vscode/**', ' **.svg' ]
10+ paths-ignore : [" **.md", " .vscode/**", " **.svg" ]
1111
1212env :
1313 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
2222 - name : Check whether unity activation requests should be done
2323 id : checksecret_job
2424 run : |
25- echo "is_SONAR_TOKEN_set=${{ env.SONAR_TOKEN != '' }}" >> $GITHUB_OUTPUT
25+ echo "is_SONAR_TOKEN_set=${{ env.SONAR_TOKEN != '' }}" >> $GITHUB_OUTPUT
2626 build :
2727 needs : [checksecret]
2828 if : needs.checksecret.outputs.is_SONAR_TOKEN_set == 'true'
@@ -32,19 +32,15 @@ jobs:
3232 - name : Set up JDK 17
3333 uses : actions/setup-java@v4
3434 with :
35- distribution : ' adopt'
35+ distribution : " adopt"
3636 java-version : 17
37- - name : Setup .NET 5 # At the moment the scanner requires dotnet 5 https://www.nuget.org/packages/dotnet-sonarscanner
38- uses : actions/setup-dotnet@v4
39- with :
40- dotnet-version : 5.0.x
4137 - name : Setup .NET
4238 uses : actions/setup-dotnet@v4
4339 with :
44- dotnet-version : 7.0 .x
40+ dotnet-version : 9 .x
4541 - uses : actions/checkout@v4
4642 with :
47- fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
43+ fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
4844 - name : Cache SonarCloud packages
4945 uses : actions/cache@v4
5046 with :
5551 run : dotnet tool install dotnet-sonarscanner --create-manifest-if-needed
5652 - name : Build and analyze
5753 env :
58- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
54+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
5955 CollectCoverage : true
60- CoverletOutputFormat : ' opencover' # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682
56+ CoverletOutputFormat : " opencover" # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682
6157 shell : pwsh
6258 run : |
6359 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/**"
0 commit comments