This commit is contained in:
@@ -0,0 +1,44 @@
|
|||||||
|
name: SonarQube Analysis
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, master]
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
- 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/**"
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build Strata.SqlTools.QueryBreakdown.sln --configuration Release
|
||||||
|
|
||||||
|
- name: SonarScanner End
|
||||||
|
run: dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
|
||||||
Reference in New Issue
Block a user