Skip to content

Commit f3afc06

Browse files
committed
Test if token is available
WE2-964 Signed-off-by: Sven Mitt <[email protected]>
1 parent 3ea1c2f commit f3afc06

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/sonarcloud-analysis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ jobs:
6363
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6464
shell: powershell
6565
run: |
66+
Write-Host "Branch: ${{ github.ref_name }}"
67+
Write-Host "Repository: ${{ github.repository }}"
68+
Write-Host "Event: ${{ github.event_name }}"
69+
if ("${{ secrets.SONAR_TOKEN }}" -eq "") {
70+
Write-Host "SONAR_TOKEN is missing"
71+
} else {
72+
Write-Host "SONAR_TOKEN is available"
73+
}
6674
.\.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"
6775
dotnet build --configuration Release --no-restore src/WebEid.Security.sln
6876
dotnet test src/WebEid.Security.sln --logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover --results-directory "TestResults"

0 commit comments

Comments
 (0)