From ae7b3af37f062e0e2999eb01db3a86beb3259336 Mon Sep 17 00:00:00 2001 From: Nicolas BLONDEAU Date: Thu, 4 May 2023 12:47:30 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 6229b4f..629aa1a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,4 +25,34 @@ steps: - dotnet restore MineGuide_linuxOnly.sln - dotnet build MineGuide_linuxOnly.sln -c Release --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0 - dotnet publish MineGuide_linuxOnly.sln -c Release --no-restore -o $CI_PROJECT_DIR/build/release - depends_on: [clone] \ No newline at end of file + depends_on: [clone] + + - name: tests + image: mcr.microsoft.com/dotnet/sdk:7.0 + commands: + - cd Sources/ + - dotnet restore MineGuide.sln + - dotnet test MineGuide.sln --no-restore + depends_on: [build_net7, build_maui] + + + - name: code-inspection-linux-only + image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7 + secrets: [ SECRET_SONAR_LOGIN ] + settings: + sonar_host: https://codefirst.iut.uca.fr/sonar/ + sonar_token: sonar_token + from_secret: SECRET_SONAR_LOGIN + commands: + - cd Sources/ + - dotnet restore MineGuide_linuxOnly.sln + - dotnet sonarscanner begin /k:MineGuide_linuxOnly1.0 /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="Tests/**" /d:sonar.login=$${PLUGIN_SONAR_TOKEN} + - dotnet build MineGuide_linuxOnly.sln -c Release --no-restore + - dotnet test MineGuide_linuxOnly.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" + - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport" + - dotnet publish MineGuide_linuxOnly.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release + - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN} + when: + event: + - push + depends_on: [tests] \ No newline at end of file