From 6166a5efec39a601883ab0c9094742fe54cdbb3d Mon Sep 17 00:00:00 2001 From: Jade VAN BRABANDT Date: Tue, 9 Jan 2024 14:46:03 +0100 Subject: [PATCH] CI : Trying to implement test --- .drone.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 05bc48e..feccd31 100755 --- a/.drone.yml +++ b/.drone.yml @@ -25,12 +25,13 @@ steps: - name: code-analysis image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7 commands: - - echo $$PLUGIN_SONAR_TOKEN - - echo $$PLUGIN_SONAR_HOST - cd Blazor/ - dotnet restore Blazor.sln + - dotnet sonarscanner begin /k:MuscuMaths /d:sonar.host.url=$${sonar_host} /d:sonar.login=$${sonar_token} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" - dotnet sonarscanner begin /k:MuscuMaths /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.login=$${PLUGIN_SONAR_TOKEN} - dotnet build Blazor.sln -c Release --no-restore + - dotnet test Test.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" + - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport" -verbosity:Verbose - dotnet publish Blazor.sln -c Release --no-restore -o $CI_PROJECT_DIR/build/release - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN} secrets: [ PLUGIN_SONAR_TOKEN ]