1- name : SonarCloud
1+ name : SonarQube
22on :
33 push :
44 branches :
@@ -11,43 +11,39 @@ jobs:
1111 runs-on : windows-latest
1212 steps :
1313 - name : Set up JDK 17
14- uses : actions/setup-java@v3
14+ uses : actions/setup-java@v4
1515 with :
1616 java-version : 17
1717 distribution : ' zulu' # Alternative distribution options are available.
18- - name : Setup .NET
19- uses : actions/setup-dotnet@v2
20- with :
21- dotnet-version : 6.0.301
22- - uses : actions/checkout@v3
18+ - uses : actions/checkout@v4
2319 with :
2420 fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
25- - name : Cache SonarCloud packages
26- uses : actions/cache@v3
21+ - name : Cache SonarQube Cloud packages
22+ uses : actions/cache@v4
2723 with :
2824 path : ~\sonar\cache
2925 key : ${{ runner.os }}-sonar
3026 restore-keys : ${{ runner.os }}-sonar
31- - name : Cache SonarCloud scanner
27+ - name : Cache SonarQube Cloud scanner
3228 id : cache-sonar-scanner
33- uses : actions/cache@v3
29+ uses : actions/cache@v4
3430 with :
35- path : .\.sonar \scanner
31+ path : ${{ runner.temp }} \scanner
3632 key : ${{ runner.os }}-sonar-scanner
3733 restore-keys : ${{ runner.os }}-sonar-scanner
38- - name : Install SonarCloud scanner
34+ - name : Install SonarQube Cloud scanner
3935 if : steps.cache-sonar-scanner.outputs.cache-hit != 'true'
4036 shell : powershell
4137 run : |
42- New-Item -Path .\.sonar \scanner -ItemType Directory
43- dotnet tool update dotnet-sonarscanner --tool-path .\.sonar \scanner
38+ New-Item -Path ${{ runner.temp }} \scanner -ItemType Directory
39+ dotnet tool update dotnet-sonarscanner --tool-path ${{ runner.temp }} \scanner
4440 - name : Build and analyze
4541 env :
46- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Optional Needed to get PR information if any
4742 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
4843 shell : powershell
4944 run : |
5045 dotnet tool install --global dotnet-coverage --version 17.6.4
51- .\.sonar\scanner\dotnet-sonarscanner begin /k:"chrdek_QueryablDataCalc" /o:"chrdek" /d:sonar.token="${{ secrets.SONAR_TOKEN}}" /d:sonar.host.url="https://sonarcloud.io"
46+ ${{ runner.temp }}\scanner\dotnet-sonarscanner begin /k:"chrdek_QueryablDataCalc" /o:"chrdek" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
47+ dotnet restore ./Queryabl.sln
5248 dotnet build .\Queryabl.csproj /t:Rebuild /p:Configuration=Debug
53- .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN}}" /d:sonar.host.url="https://sonarcloud.io "
49+ .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }} "
0 commit comments