From 0b3d9f0476c8d4a67f0e8cb055f3765ae832597a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20LAVERGNE?= Date: Sat, 15 Jun 2024 22:13:34 +0200 Subject: [PATCH] CI commit --- .drone.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 67de3ab..49c9b01 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,7 +10,15 @@ trigger: - push steps: - - name: build + - name: build-Models + image: mcr.microsoft.com/dotnet/sdk:7.0 + commands: + - cd Sources/GameAtlas/Models + - dotnet restore + - dotnet build -c Release --no-restore + - dotnet publish -c Release --no-restore -o $CI_PROJECT_DIR/build/release + + - name: build-MAUI image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest commands: - cd Sources/GameAtlas/ @@ -22,8 +30,8 @@ steps: commands: - cd Sources/GameAtlas/ - dotnet restore GameAtlas.sln - - dotnet test GameAtlas.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" - depends_on: [build] + - dotnet test GameAtlas.sln --no-restore + depends_on: [build-Models] - name: code-analysis image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7-maui @@ -37,7 +45,7 @@ steps: commands: - cd Sources/GameAtlas/ - dotnet restore GameAtlas.sln - - dotnet sonarscanner begin /k:"GameAtlas" /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 sonarscanner begin /k:"GameAtlas" /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.login=$${PLUGIN_SONAR_TOKEN} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="Tests/**" - dotnet build GameAtlas.sln -c Release --no-restore - dotnet test GameAtlas.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport" @@ -55,4 +63,4 @@ steps: - master event: - push - depends_on: [ build, tests ] + depends_on: [ build-Models, tests ]