|
16 | 16 | - name: Setup dotnet |
17 | 17 | uses: actions/setup-dotnet@v4 |
18 | 18 | with: |
19 | | - dotnet-version: 6.0.x # SDK Version to use. |
| 19 | + dotnet-version: 8.0.x # SDK Version to use. |
20 | 20 |
|
21 | 21 | - name: Set up JDK 21 |
22 | 22 | uses: actions/setup-java@v4 |
@@ -55,12 +55,14 @@ jobs: |
55 | 55 | shell: powershell |
56 | 56 | run: | |
57 | 57 | New-Item -Path .\.sonar\scanner -ItemType Directory |
58 | | - dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner |
| 58 | + dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner |
| 59 | + dotnet tool install dotnet-sonarscanner --tool-path .\.sonar\scanner --version 10.1.2 |
59 | 60 |
|
60 | 61 | - name: Build and analyze |
61 | 62 | env: |
62 | 63 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any |
63 | 64 | SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
| 65 | + CACHE_VERSION: ${{ vars.CACHE_VERSION }} |
64 | 66 | shell: powershell |
65 | 67 | run: | |
66 | 68 | Write-Host "Branch: ${{ github.ref_name }}" |
|
69 | 71 | if ("${{ secrets.SONAR_TOKEN }}" -eq "") { |
70 | 72 | Write-Host "SONAR_TOKEN is missing" |
71 | 73 | } else { |
72 | | - Write-Host "SONAR_TOKEN is available" |
| 74 | + Write-Host "SONAR_TOKEN is available -2 (length: $("${{ secrets.SONAR_TOKEN }}".Length))" |
73 | 75 | } |
| 76 | + Remove-Item Env:CACHE_VERSION -ErrorAction SilentlyContinue |
74 | 77 | .\.sonar\scanner\dotnet-sonarscanner begin /k:"web-eid_web-eid-authtoken-validation-dotnet" /o:"web-eid" /d:sonar.cs.opencover.reportsPaths="**/TestResults/**/coverage.opencover.xml" /d:sonar.cs.vstest.reportsPaths="**/TestResults/*.trx" /d:sonar.verbose=true /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" |
75 | 78 | dotnet build --configuration Release --no-restore src/WebEid.Security.sln |
76 | 79 | dotnet test src/WebEid.Security.sln --logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover --results-directory "TestResults" |
|
0 commit comments