@@ -28,7 +28,7 @@ concurrency:
2828 cancel-in-progress : true
2929jobs :
3030 sonarcloud :
31- runs-on : windows -latest
31+ runs-on : ubuntu -latest
3232 permissions :
3333 contents : read
3434 steps :
@@ -46,38 +46,25 @@ jobs:
4646 with :
4747 java-version : 17
4848 distribution : " zulu"
49- - name : Cache SonarCloud packages
50- uses : actions/cache@v4
51- with :
52- path : ~\sonar\cache
53- key : ${{ runner.os }}-sonar
54- restore-keys : ${{ runner.os }}-sonar
55- - name : Cache SonarCloud scanner
56- id : cache-sonar-scanner
57- uses : actions/cache@v4
58- with :
59- path : .\.sonar\scanner
60- key : ${{ runner.os }}-sonar-scanner
61- restore-keys : ${{ runner.os }}-sonar-scanner
6249 - name : Install tools
6350 run : dotnet tool restore
6451 - name : Build and analyze with coverage
6552 env :
6653 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
6754 USE_MOCK_SERVER : ${{ vars.USE_MOCK_SERVER }}
68- shell : powershell
6955 run : |
70- .\.sonar\scanner\ dotnet-sonarscanner begin `
71- /k:"Tsingis_bitcoin-web-api" `
72- /o:"tsingis" `
73- /d:sonar.token="${{ env.SONAR_TOKEN }}" `
74- /d:sonar.host.url="https://sonarcloud.io" `
75- /d:sonar.cs.vscoveragexml.reportsPaths="coverage.xml" `
56+ dotnet tool run dotnet -sonarscanner begin \
57+ /k:"Tsingis_bitcoin-web-api" \
58+ /o:"tsingis" \
59+ /d:sonar.token="${{ env.SONAR_TOKEN }}" \
60+ /d:sonar.host.url="https://sonarcloud.io" \
61+ /d:sonar.cs.vscoveragexml.reportsPaths="coverage.xml" \
7662 /d:sonar.scanner.scanAll=false
7763
7864 dotnet restore --locked-mode
7965 dotnet build --no-restore
80- dotnet tool run dotnet-coverage collect "dotnet test --no-restore --no-build" -f xml -o "coverage.xml"
66+ dotnet tool run dotnet-coverage collect \
67+ "dotnet test --no-restore --no-build" -f xml -o "coverage.xml"
8168
82- .\.sonar\scanner\ dotnet-sonarscanner end `
69+ dotnet tool run dotnet -sonarscanner end \
8370 /d:sonar.token="${{ env.SONAR_TOKEN }}"
0 commit comments