From 83a84f3ea310afe3fcc3cee080eac6ec257e6a31 Mon Sep 17 00:00:00 2001 From: kon0379 <jakub.konvicka@vsb.cz> Date: Wed, 10 Jan 2024 18:38:28 +0000 Subject: [PATCH] feat: Add dotnet test coverage and sonarqube test coverage xml path --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f88c281..c521e99 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -104,9 +104,9 @@ sonarqube-check: paths: - .sonar/cache script: - - "dotnet sonarscanner begin /k:\"kon0379DiplomaThesis\" /d:sonar.token=\"$SONAR_TOKEN\" /d:\"sonar.host.url=$SONAR_HOST_URL\" " + - "dotnet sonarscanner begin /k:\"kon0379DiplomaThesis\" /d:sonar.token=\"$SONAR_TOKEN\" /d:\"sonar.host.url=$SONAR_HOST_URL\" /d:sonar.cs.opencover.reportsPaths=\"**/TestResults/*/*.xml\"" - "sudo dotnet build" - - "dotnet-coverage collect 'dotnet test' -f xml -o 'coverage.xml'" + - "dotnet test --no-build --collect:\"XPlat Code Coverage\"" - "dotnet sonarscanner end /d:sonar.token=\"$SONAR_TOKEN\"" allow_failure: true only: -- GitLab