Files
sql-utilities/.gitea/workflows/sonarqube.yml
T
bermudalamb f827492b30
SonarQube Analysis / sonarqube (push) Failing after 2m45s
Update .gitea/workflows/sonarqube.yml
2026-05-15 15:37:50 -05:00

59 lines
1.7 KiB
YAML

name: SonarQube Analysis
on:
push:
branches: [main, master]
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
jobs:
sonarqube:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install SonarScanner for .NET
run: |
dotnet tool install --global dotnet-sonarscanner
echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
- name: Debug token sanity check
run: |
curl -s -w "\nHTTP %{http_code}\n" \
-u "${{ secrets.SONAR_TOKEN }}:" \
"${{ secrets.SONAR_HOST_URL }}/api/plugins/installed" | head -5
echo "---"
curl -s -w "\nHTTP %{http_code}\n" \
-u "${{ secrets.SONAR_TOKEN }}:" \
"${{ secrets.SONAR_HOST_URL }}/api/authentication/validate"
- name: SonarScanner Begin
run: |
dotnet sonarscanner begin \
/k:"sql-utilities" \
/d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" \
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" \
/d:sonar.exclusions="**/bin/**,**/obj/**" \
/d:sonar.verbose=true
- name: Build
run: dotnet build Strata.SqlTools.QueryBreakdown.sln --configuration Release
- name: SonarScanner End
run: dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"