From 5ef25d601f63d76fcae79ce841db959bbc118502 Mon Sep 17 00:00:00 2001 From: csimonapastore Date: Fri, 21 Feb 2025 13:55:34 +0100 Subject: [PATCH] Excluding migrations files from analysis --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79f012b..42e76df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,10 +48,10 @@ jobs: MONGO_DB_SERVER: ${{ secrets.MONGO_DB_SERVER }} shell: powershell run: | - .\.sonar\scanner\dotnet-sonarscanner begin /k:"csimonapastore_BasicDotnetTemplate" /o:"csimonapastore-github" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml + .\.sonar\scanner\dotnet-sonarscanner begin /k:"csimonapastore_BasicDotnetTemplate" /o:"csimonapastore-github" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml /d:sonar.exclusions="**/Migrations/**.cs" dotnet restore dotnet build --no-incremental - dotnet-coverage collect "dotnet test" -f xml -o "coverage.xml" + dotnet-coverage collect "dotnet test" -f xml -o "coverage.xml" dotnet test ./MainProject.Tests/MainProject.Tests.csproj --collect "Code Coverage" --results-directory "./TestResults" Get-Content -Path "coverage.xml" .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"