From 4663e10f964759c8a1775a9ef55e249cf5197564 Mon Sep 17 00:00:00 2001 From: csimonapastore Date: Mon, 13 May 2024 00:26:17 +0200 Subject: [PATCH] Revert "Fixing coverage - 7" This reverts commit b393abe94848eed4c4e3f8f0ff822408c1799867. --- .github/workflows/build.yml | 2 +- MainProject/Controllers/RootController.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a3e4717..e3efe2c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,7 @@ jobs: .\.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 dotnet restore dotnet build --no-incremental - dotnet-coverage collect "dotnet test" -f Cobertura -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 }}" diff --git a/MainProject/Controllers/RootController.cs b/MainProject/Controllers/RootController.cs index f48b1b0..ff54210 100644 --- a/MainProject/Controllers/RootController.cs +++ b/MainProject/Controllers/RootController.cs @@ -5,12 +5,12 @@ using Microsoft.AspNetCore.Http.HttpResults; namespace BasicDotnetTemplate.MainProject.Controllers { [Route("")] - public class RootController : ControllerBase + public class RootController: ControllerBase { public RootController() { } [HttpGet("")] - public IActionResult GetRoot() + public IActionResult GetVersion() { return Ok(); }