1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-22 08:18:47 +00:00

ci: update sonarcloud to Java 17

Also changes sonar.login option to sonar.token
This commit is contained in:
Oliver Booth 2023-08-27 04:33:24 +01:00
parent 1c58acd0a5
commit 74f957f0c2
Signed by: oliverbooth
GPG Key ID: B89D139977693FED

View File

@ -12,17 +12,18 @@ jobs:
name: SonarCloud Analysis
runs-on: windows-latest
steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 1.11
java-version: 17
distribution: 'zulu'
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache SonarCloud packages
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
@ -30,7 +31,7 @@ jobs:
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
@ -49,8 +50,7 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
run: |
dotnet tool install JetBrains.dotCover.GlobalTool -g
.\.sonar\scanner\dotnet-sonarscanner begin /k:"oliverbooth_X10D" /o:"oliverbooth" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.dotcover.reportsPaths=dotCover.Output.html
.\.sonar\scanner\dotnet-sonarscanner begin /k:"oliverbooth_X10D" /o:"oliverbooth" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
dotnet build --no-incremental
dotnet dotcover test --dcReportType=HTML
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"