Skip to content

feat: Add LMGUI Engine to Luxoria.App solution #84

feat: Add LMGUI Engine to Luxoria.App solution

feat: Add LMGUI Engine to Luxoria.App solution #84

Workflow file for this run

name: Scan with SonarCloud
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
scan-sonarcloud:
name: Build and analyze
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache .NET dependencies
uses: actions/cache@v3
with:
path: |
~/.nuget/packages
~/.dotnet
key: ${{ runner.os }}-dotnet-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-dotnet-
- name: Install SonarQube scanner
shell: powershell
run: |
dotnet tool install --global dotnet-sonarscanner
- name: Install .NET coverage tool
shell: powershell
run: |
dotnet tool install --global dotnet-coverage
- name: Cache SonarCloud data
uses: actions/cache@v3
with:
path: ~/.sonar
key: ${{ runner.os }}-sonar-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-sonar-
- name: Analyze with SonarQube
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
run: |
dotnet sonarscanner begin /k:"LuxoriaSoft_Luxoria" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /o:"luxoria" /d:sonar.coverage.exclusions="**/App.xaml.cs, **/MainWindow.xaml.cs, **/*.sqignore" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
dotnet build Luxoria.App/Luxoria.App.sln --no-incremental
dotnet-coverage collect "dotnet test Luxoria.App/Luxoria.App.sln" -f xml -o "coverage.xml"
dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"