1- name : SonarQube
1+ name : SonarCloud
22on :
33 push :
44 branches :
@@ -11,37 +11,43 @@ jobs:
1111 runs-on : windows-latest
1212 steps :
1313 - name : Set up JDK 17
14- uses : actions/setup-java@v4
14+ uses : actions/setup-java@v3
1515 with :
1616 java-version : 17
1717 distribution : ' zulu' # Alternative distribution options are available.
18- - uses : actions/checkout@v4
18+ - name : Setup .NET
19+ uses : actions/setup-dotnet@v2
20+ with :
21+ dotnet-version : 6.0.301
22+ - uses : actions/checkout@v3
1923 with :
2024 fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
21- - name : Cache SonarQube Cloud packages
22- uses : actions/cache@v4
25+ - name : Cache SonarCloud packages
26+ uses : actions/cache@v3
2327 with :
2428 path : ~\sonar\cache
2529 key : ${{ runner.os }}-sonar
2630 restore-keys : ${{ runner.os }}-sonar
27- - name : Cache SonarQube Cloud scanner
31+ - name : Cache SonarCloud scanner
2832 id : cache-sonar-scanner
29- uses : actions/cache@v4
33+ uses : actions/cache@v3
3034 with :
31- path : ${{ runner.temp }} \scanner
35+ path : .\.sonar \scanner
3236 key : ${{ runner.os }}-sonar-scanner
3337 restore-keys : ${{ runner.os }}-sonar-scanner
34- - name : Install SonarQube Cloud scanner
38+ - name : Install SonarCloud scanner
3539 if : steps.cache-sonar-scanner.outputs.cache-hit != 'true'
3640 shell : powershell
3741 run : |
38- New-Item -Path ${{ runner.temp }} \scanner -ItemType Directory
39- dotnet tool update dotnet-sonarscanner --tool-path ${{ runner.temp }} \scanner
42+ New-Item -Path .\.sonar \scanner -ItemType Directory
43+ dotnet tool update dotnet-sonarscanner --tool-path .\.sonar \scanner
4044 - name : Build and analyze
4145 env :
46+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Optional Needed to get PR information if any
4247 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
4348 shell : powershell
4449 run : |
45- ${{ runner.temp }}\scanner\dotnet-sonarscanner begin /k:"chrdek_linqpath_prerel" /o:"chrdek" /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
46- dotnet build
47- ${{ runner.temp }}\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
50+ dotnet tool install --global dotnet-coverage
51+ .\.sonar\scanner\dotnet-sonarscanner begin /k:"chrdek_QueryablDataCalc" /o:"chrdek" /d:sonar.token="${{ secrets.SONAR_TOKEN}}" /d:sonar.host.url="https://sonarcloud.io"
52+ dotnet build .\Queryabl.csproj /t:Rebuild /p:Configuration=Debug
53+ .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN}}"
0 commit comments