From 57f573cf89fa4b0453410df076f20a3b16f2d80b Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Wed, 5 Apr 2023 01:58:32 +0200 Subject: [PATCH 01/21] :alembic: change std to MAUI build job --- .drone.yml | 24 ++++++++++++++++-------- MCTG/Views/Views.csproj | 4 +++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index 28b413b..c3f58e0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,16 +7,24 @@ trigger: - push steps: + # - name: build + # image: mcr.microsoft.com/dotnet/sdk:7.0 + # volumes: + # - name: docs + # path: /docs + # commands: + # - cd MCTG/ + # - dotnet restore CI-CD.sln + # - dotnet build CI-CD.sln -c Release --no-restore + # - dotnet publish CI-CD.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release + - name: build - image: mcr.microsoft.com/dotnet/sdk:7.0 - volumes: - - name: docs - path: /docs + image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest commands: - cd MCTG/ - - dotnet restore CI-CD.sln - - dotnet build CI-CD.sln -c Release --no-restore - - dotnet publish CI-CD.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release + - dotnet restore SAE-2.01.sln + - dotnet build SAE-2.01.sln -c Release --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0 + - dotnet publish Views/Views.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net7.0-android /p:AndroidSdkDirectory=/usr/lib/android-sdk - name: tests image: mcr.microsoft.com/dotnet/sdk:7.0 @@ -24,7 +32,7 @@ steps: - cd MCTG/ - dotnet restore CI-CD.sln - dotnet test CI-CD.sln --no-restore - depends_on: [build] + depends_on: [ build ] # - name: code-analysis # image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dronesonarplugin-dotnet6 diff --git a/MCTG/Views/Views.csproj b/MCTG/Views/Views.csproj index d1061d8..b1615cc 100644 --- a/MCTG/Views/Views.csproj +++ b/MCTG/Views/Views.csproj @@ -1,8 +1,10 @@  - net7.0-android;net7.0-ios;net7.0-maccatalyst + net7.0-android $(TargetFrameworks);net7.0-windows10.0.19041.0 + $(TargetFrameworks);net7.0-ios + $(TargetFrameworks);net7.0-maccatalyst Exe From 186e31bc4e5fabf987c5769c987732ea22326af2 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Wed, 5 Apr 2023 02:22:30 +0200 Subject: [PATCH 02/21] :alembic: add publish of console app & MAUI Unit testing --- .drone.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index c3f58e0..0636abf 100644 --- a/.drone.yml +++ b/.drone.yml @@ -24,14 +24,15 @@ steps: - cd MCTG/ - dotnet restore SAE-2.01.sln - dotnet build SAE-2.01.sln -c Release --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0 + - dotnet publish MCTGApp/MCTGApp.csproj -c Release --no-restore -o CI_PROJECT_DIR/build/release - dotnet publish Views/Views.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net7.0-android /p:AndroidSdkDirectory=/usr/lib/android-sdk - name: tests - image: mcr.microsoft.com/dotnet/sdk:7.0 + image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest commands: - cd MCTG/ - - dotnet restore CI-CD.sln - - dotnet test CI-CD.sln --no-restore + - dotnet restore SAE-2.01.sln + - dotnet test SAE-2.01.sln --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0 depends_on: [ build ] # - name: code-analysis From 3d077ed43280356bf8ee258894e5a4b4cc60ff54 Mon Sep 17 00:00:00 2001 From: Alexandre AGOSTINHO Date: Wed, 5 Apr 2023 02:41:28 +0200 Subject: [PATCH 03/21] clean unused file `CI-CD.sln` --- MCTG/CI-CD.sln | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 MCTG/CI-CD.sln diff --git a/MCTG/CI-CD.sln b/MCTG/CI-CD.sln deleted file mode 100644 index ab7e910..0000000 --- a/MCTG/CI-CD.sln +++ /dev/null @@ -1,42 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.33516.290 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MCTGApp", "MCTGApp\MCTGApp.csproj", "{666C2211-8EBB-4FC8-9484-CB93BC854153}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MCTGLib", "MCTGLib\MCTGLib.csproj", "{42FF86BD-92F9-4A32-A938-68515905378F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MCTGLib_UnitTests", "Tests\MCTGLib_UnitTests\MCTGLib_UnitTests.csproj", "{45AB746A-194B-4E43-81EB-83B06F35AA33}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{08B80CE8-A01D-4D86-8989-AF225D5DA48C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {666C2211-8EBB-4FC8-9484-CB93BC854153}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {666C2211-8EBB-4FC8-9484-CB93BC854153}.Debug|Any CPU.Build.0 = Debug|Any CPU - {666C2211-8EBB-4FC8-9484-CB93BC854153}.Release|Any CPU.ActiveCfg = Release|Any CPU - {666C2211-8EBB-4FC8-9484-CB93BC854153}.Release|Any CPU.Build.0 = Release|Any CPU - {42FF86BD-92F9-4A32-A938-68515905378F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {42FF86BD-92F9-4A32-A938-68515905378F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {42FF86BD-92F9-4A32-A938-68515905378F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {42FF86BD-92F9-4A32-A938-68515905378F}.Release|Any CPU.Build.0 = Release|Any CPU - {45AB746A-194B-4E43-81EB-83B06F35AA33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45AB746A-194B-4E43-81EB-83B06F35AA33}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45AB746A-194B-4E43-81EB-83B06F35AA33}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45AB746A-194B-4E43-81EB-83B06F35AA33}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {45AB746A-194B-4E43-81EB-83B06F35AA33} = {08B80CE8-A01D-4D86-8989-AF225D5DA48C} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {ADEA5603-1EF6-4D43-9493-7D6D9DE7FA3F} - EndGlobalSection -EndGlobal From 86d187e268701f801a5ad9d90df881fbf3829aa9 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Wed, 5 Apr 2023 11:30:30 +0200 Subject: [PATCH 04/21] :art: add exemple of code --- MCTG/MCTGApp/MCTGApp.csproj | 6 +++- MCTG/MCTGApp/Program.cs | 34 +++++++++++++++++++-- MCTG/MCTGLib/Class1.cs | 7 ----- MCTG/MCTGLib/Recipe.cs | 60 +++++++++++++++++++++++++++++++++++++ 4 files changed, 97 insertions(+), 10 deletions(-) delete mode 100644 MCTG/MCTGLib/Class1.cs create mode 100644 MCTG/MCTGLib/Recipe.cs diff --git a/MCTG/MCTGApp/MCTGApp.csproj b/MCTG/MCTGApp/MCTGApp.csproj index f02677b..7517cf8 100644 --- a/MCTG/MCTGApp/MCTGApp.csproj +++ b/MCTG/MCTGApp/MCTGApp.csproj @@ -1,4 +1,4 @@ - + Exe @@ -7,4 +7,8 @@ enable + + + + diff --git a/MCTG/MCTGApp/Program.cs b/MCTG/MCTGApp/Program.cs index 3751555..c45d82d 100644 --- a/MCTG/MCTGApp/Program.cs +++ b/MCTG/MCTGApp/Program.cs @@ -1,2 +1,32 @@ -// See https://aka.ms/new-console-template for more information -Console.WriteLine("Hello, World!"); +using System; +using MCTG.Model; + + +namespace MCTG.Program; + +public static class Program +{ + public static void Main() + { + Console.WriteLine("Helle World!"); + + Recipe recipe = new Recipe( + 1, + "Cookies aux pépites de chocolat", + new List(new string[]{ + "2 pommes", + "3L de vin", + "500g de farine" + }), + "Etape 1:\n" + + "\tCouper les pommes\n" + + "Etape 2:\n" + + "\tLes disposer sur le plat et mettre le vin dessus\n" + + "Etape 3:\n" + + "\tMettez toute la farine ensuite, puis 4h32 au four.\n" + + "\nDégustez c'est prêt !" + ); + + recipe.Display(); + } +} \ No newline at end of file diff --git a/MCTG/MCTGLib/Class1.cs b/MCTG/MCTGLib/Class1.cs deleted file mode 100644 index 5b51184..0000000 --- a/MCTG/MCTGLib/Class1.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace MCTGLib -{ - public class Class1 - { - - } -} \ No newline at end of file diff --git a/MCTG/MCTGLib/Recipe.cs b/MCTG/MCTGLib/Recipe.cs new file mode 100644 index 0000000..b69d842 --- /dev/null +++ b/MCTG/MCTGLib/Recipe.cs @@ -0,0 +1,60 @@ +using System.Text; + +namespace MCTG.Model +{ + public class Recipe + { + public uint Id { get; set; } + public string Title { get; set; } + public List Ingredients { get; set; } + public string Preparation { get; set; } + + /// + /// Constructor of a Recipe. + /// + /// Identificator + /// The name of the recipe + /// A list of ingredient needed by the preparation + /// The text that explain the preparation of the recipe + public Recipe(uint id, string title, List ingredients, string preparation) + { + Id = id; + Title = title; + Ingredients = ingredients; + Preparation = preparation; + } + + /// + /// Concatenate the list of ingredients in a single string + /// + /// The list of ingredients in string format + private string ConcatIngredients() + { + StringBuilder sb = new StringBuilder(); + foreach (string str in Ingredients) sb.Append("\t- " + str + "\n"); + + return sb.ToString(); + } + + /// + /// Build a string with all elements (title, ingredients, preparation, ...) + /// + /// A string that represent the recipe + public override string ToString() + { + return $"{Title} -- id:{Id}\n\n" + + "List of ingredient:\n" + + ConcatIngredients() + "\n\n" + + "Preparation:\n" + + $"{Preparation}\n"; + } + + /// + /// Display the recipe in the console + /// + public void Display() + { + Console.WriteLine(this.ToString()); + } + } +} \ No newline at end of file From 6570512fa6fdf0def74f5d765a928278fd278f86 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Wed, 5 Apr 2023 12:02:30 +0200 Subject: [PATCH 05/21] del useless ommun namespace --- MCTG/MCTGApp/Program.cs | 4 ++-- MCTG/MCTGLib/Recipe.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MCTG/MCTGApp/Program.cs b/MCTG/MCTGApp/Program.cs index c45d82d..c0760f0 100644 --- a/MCTG/MCTGApp/Program.cs +++ b/MCTG/MCTGApp/Program.cs @@ -1,8 +1,8 @@ using System; -using MCTG.Model; +using Model; -namespace MCTG.Program; +namespace Program; public static class Program { diff --git a/MCTG/MCTGLib/Recipe.cs b/MCTG/MCTGLib/Recipe.cs index b69d842..83389cd 100644 --- a/MCTG/MCTGLib/Recipe.cs +++ b/MCTG/MCTGLib/Recipe.cs @@ -1,6 +1,6 @@ using System.Text; -namespace MCTG.Model +namespace Model { public class Recipe { From 2a1e72d5e10129f60afd809dba851d351b3dbdb0 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Wed, 5 Apr 2023 16:16:07 +0200 Subject: [PATCH 06/21] :green_heart: fix sonar deployment --- .drone.yml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0636abf..7789a7a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -35,25 +35,25 @@ steps: - dotnet test SAE-2.01.sln --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0 depends_on: [ build ] -# - name: code-analysis -# image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dronesonarplugin-dotnet6 -# commands: -# - cd MCTG/ -# - dotnet restore CI-CD.sln -# - dotnet sonarscanner begin /k:gitrepotest /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 CI-CD.sln -c Release --no-restore -# - dotnet test CI-CD.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 CI-CD.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release -# - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN} -# secrets: [ SECRET_SONAR_LOGIN ] -# settings: -# # accessible en ligne de commande par ${PLUGIN_SONAR_HOST} -# sonar_host: https://codefirst.iut.uca.fr/sonar/ -# # accessible en ligne de commande par ${PLUGIN_SONAR_TOKEN} -# sonar_token: -# from_secret: SECRET_SONAR_LOGIN -# depends_on: [ tests ] + - name: code-analysis + image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7 + commands: + - cd MCTG/ + - dotnet restore MCTGApp/MCTGApp.csproj + - dotnet sonarscanner begin /k:gitrepotest /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 MCTGApp/MCTGApp.csproj -c Release --no-restore + - dotnet test MCTGApp/MCTGApp.csproj --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 MCTGApp/MCTGApp.csproj -c Release --no-restore -o CI_PROJECT_DIR/build/release + - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN} + secrets: [ SECRET_SONAR_LOGIN ] + settings: + # accessible en ligne de commande par ${PLUGIN_SONAR_HOST} + sonar_host: https://codefirst.iut.uca.fr/sonar/ + # accessible en ligne de commande par ${PLUGIN_SONAR_TOKEN} + sonar_token: + from_secret: SECRET_SONAR_LOGIN + depends_on: [ tests ] - name: generate-and-deploy-docs image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer From 6b87750bbd53c131ab379b0e3b20e724e2b1d8a0 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Wed, 5 Apr 2023 16:58:46 +0200 Subject: [PATCH 07/21] :green_heart: fix CI (indentation) --- .drone.yml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7789a7a..70201a7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -35,25 +35,25 @@ steps: - dotnet test SAE-2.01.sln --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0 depends_on: [ build ] - - name: code-analysis - image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7 - commands: - - cd MCTG/ - - dotnet restore MCTGApp/MCTGApp.csproj - - dotnet sonarscanner begin /k:gitrepotest /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 MCTGApp/MCTGApp.csproj -c Release --no-restore - - dotnet test MCTGApp/MCTGApp.csproj --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 MCTGApp/MCTGApp.csproj -c Release --no-restore -o CI_PROJECT_DIR/build/release - - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN} - secrets: [ SECRET_SONAR_LOGIN ] - settings: - # accessible en ligne de commande par ${PLUGIN_SONAR_HOST} - sonar_host: https://codefirst.iut.uca.fr/sonar/ - # accessible en ligne de commande par ${PLUGIN_SONAR_TOKEN} - sonar_token: - from_secret: SECRET_SONAR_LOGIN - depends_on: [ tests ] + - name: code-analysis + image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7 + commands: + - cd MCTG/ + - dotnet restore MCTGApp/MCTGApp.csproj + - dotnet sonarscanner begin /k:gitrepotest /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 MCTGApp/MCTGApp.csproj -c Release --no-restore + - dotnet test MCTGApp/MCTGApp.csproj --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 MCTGApp/MCTGApp.csproj -c Release --no-restore -o CI_PROJECT_DIR/build/release + - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN} + secrets: [ SECRET_SONAR_LOGIN ] + settings: + # accessible en ligne de commande par ${PLUGIN_SONAR_HOST} + sonar_host: https://codefirst.iut.uca.fr/sonar/ + # accessible en ligne de commande par ${PLUGIN_SONAR_TOKEN} + sonar_token: + from_secret: SECRET_SONAR_LOGIN + depends_on: [ tests ] - name: generate-and-deploy-docs image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer From 4350a9c3fc362ba7d91fbcb92fbf1970365ec2c7 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Wed, 5 Apr 2023 17:12:29 +0200 Subject: [PATCH 08/21] :alembic: try fix CI (sonar) --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 70201a7..71bd077 100644 --- a/.drone.yml +++ b/.drone.yml @@ -39,12 +39,12 @@ steps: image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7 commands: - cd MCTG/ - - dotnet restore MCTGApp/MCTGApp.csproj + - dotnet restore SAE-2.01.sln - dotnet sonarscanner begin /k:gitrepotest /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 MCTGApp/MCTGApp.csproj -c Release --no-restore - - dotnet test MCTGApp/MCTGApp.csproj --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" + - dotnet build SAE-2.01.sln -c Release --no-restore + - dotnet test SAE-2.01.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 MCTGApp/MCTGApp.csproj -c Release --no-restore -o CI_PROJECT_DIR/build/release + - dotnet publish SAE-2.01.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN} secrets: [ SECRET_SONAR_LOGIN ] settings: From e76f9271c6051164c995f01f70b7ba2c87c75dca Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Wed, 5 Apr 2023 17:25:52 +0200 Subject: [PATCH 09/21] :alembic: try fix CI 2 (sonar) --- .drone.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 71bd077..81bd90e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -39,12 +39,15 @@ steps: image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7 commands: - cd MCTG/ - - dotnet restore SAE-2.01.sln + - cp SAE-2.01.sln CI.sln + - sed -i '10,11d' CI.sln + - sed -i '30,35d' CI.sln + - dotnet restore CI.sln - dotnet sonarscanner begin /k:gitrepotest /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 SAE-2.01.sln -c Release --no-restore - - dotnet test SAE-2.01.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" + - dotnet build CI.sln -c Release --no-restore + - dotnet test CI.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 SAE-2.01.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release + - dotnet publish CI.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN} secrets: [ SECRET_SONAR_LOGIN ] settings: From 81fd9220a5e3df45564bda98d5799ef520a29e22 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Wed, 5 Apr 2023 17:43:44 +0200 Subject: [PATCH 10/21] :alembic: try fix CI 3 (sonar) --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 81bd90e..b20f71b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -40,8 +40,8 @@ steps: commands: - cd MCTG/ - cp SAE-2.01.sln CI.sln - - sed -i '10,11d' CI.sln - sed -i '30,35d' CI.sln + - sed -i '10,11d' CI.sln - dotnet restore CI.sln - dotnet sonarscanner begin /k:gitrepotest /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 CI.sln -c Release --no-restore From 5fff4456bbc9f1a45d63edf326aa210379712b82 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Wed, 5 Apr 2023 17:51:27 +0200 Subject: [PATCH 11/21] :green_heart: final fix CI (sonar) --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index b20f71b..7bf0bdd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -43,7 +43,7 @@ steps: - sed -i '30,35d' CI.sln - sed -i '10,11d' CI.sln - dotnet restore CI.sln - - dotnet sonarscanner begin /k:gitrepotest /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:SAE-2.01 /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 CI.sln -c Release --no-restore - dotnet test CI.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport" From 890ee8cb4cdc9b102946af9c228b0a4d93b3cc71 Mon Sep 17 00:00:00 2001 From: Alexandre AGOSTINHO Date: Wed, 5 Apr 2023 18:02:39 +0200 Subject: [PATCH 12/21] :speech_balloon: add sonar bages --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 17eb66f..b3889c6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ -[![Build Status](https://codefirst.iut.uca.fr/api/badges/alexandre.agostinho/SAE-2.01/status.svg)](https://codefirst.iut.uca.fr/alexandre.agostinho/SAE-2.01) - -# SAE 2.01 - Développement d'une application +[![Build Status](https://codefirst.iut.uca.fr/api/badges/alexandre.agostinho/SAE-2.01/status.svg)](https://codefirst.iut.uca.fr/alexandre.agostinho/SAE-2.01) +[![Quality Gate Status](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=gitrepotest&metric=alert_status&token=e2b9d99abef97a250de044cc5e4b9f1d6817b67d)](https://codefirst.iut.uca.fr/sonar/dashboard?id=gitrepotest) +[![Code Smells](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=gitrepotest&metric=code_smells&token=e2b9d99abef97a250de044cc5e4b9f1d6817b67d)](https://codefirst.iut.uca.fr/sonar/dashboard?id=gitrepotest) +[![Coverage](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=gitrepotest&metric=coverage&token=e2b9d99abef97a250de044cc5e4b9f1d6817b67d)](https://codefirst.iut.uca.fr/sonar/dashboard?id=gitrepotest) +[![Maintainability Rating](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=gitrepotest&metric=sqale_rating&token=e2b9d99abef97a250de044cc5e4b9f1d6817b67d)](https://codefirst.iut.uca.fr/sonar/dashboard?id=gitrepotest) +[![Reliability Rating](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=gitrepotest&metric=reliability_rating&token=e2b9d99abef97a250de044cc5e4b9f1d6817b67d)](https://codefirst.iut.uca.fr/sonar/dashboard?id=gitrepotest) +[![Vulnerabilities](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=gitrepotest&metric=vulnerabilities&token=e2b9d99abef97a250de044cc5e4b9f1d6817b67d)](https://codefirst.iut.uca.fr/sonar/dashboard?id=gitrepotest) + + + +# SAE 2.01 - Développement d'une application From d4c871e01fe7d3736cba9b561d51e1f33d3a4294 Mon Sep 17 00:00:00 2001 From: Alexandre AGOSTINHO Date: Wed, 5 Apr 2023 18:33:45 +0200 Subject: [PATCH 13/21] correction about the badges --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b3889c6..7bcbf97 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ [![Build Status](https://codefirst.iut.uca.fr/api/badges/alexandre.agostinho/SAE-2.01/status.svg)](https://codefirst.iut.uca.fr/alexandre.agostinho/SAE-2.01) -[![Quality Gate Status](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=gitrepotest&metric=alert_status&token=e2b9d99abef97a250de044cc5e4b9f1d6817b67d)](https://codefirst.iut.uca.fr/sonar/dashboard?id=gitrepotest) -[![Code Smells](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=gitrepotest&metric=code_smells&token=e2b9d99abef97a250de044cc5e4b9f1d6817b67d)](https://codefirst.iut.uca.fr/sonar/dashboard?id=gitrepotest) -[![Coverage](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=gitrepotest&metric=coverage&token=e2b9d99abef97a250de044cc5e4b9f1d6817b67d)](https://codefirst.iut.uca.fr/sonar/dashboard?id=gitrepotest) -[![Maintainability Rating](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=gitrepotest&metric=sqale_rating&token=e2b9d99abef97a250de044cc5e4b9f1d6817b67d)](https://codefirst.iut.uca.fr/sonar/dashboard?id=gitrepotest) -[![Reliability Rating](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=gitrepotest&metric=reliability_rating&token=e2b9d99abef97a250de044cc5e4b9f1d6817b67d)](https://codefirst.iut.uca.fr/sonar/dashboard?id=gitrepotest) -[![Vulnerabilities](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=gitrepotest&metric=vulnerabilities&token=e2b9d99abef97a250de044cc5e4b9f1d6817b67d)](https://codefirst.iut.uca.fr/sonar/dashboard?id=gitrepotest) +[![Quality Gate Status](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=SAE-2.01&metric=alert_status&token=6fe832930cdc587b56754b15a8c44c85c2d44401)](https://codefirst.iut.uca.fr/sonar/dashboard?id=SAE-2.01) +[![Code Smells](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=SAE-2.01&metric=code_smells&token=6fe832930cdc587b56754b15a8c44c85c2d44401)](https://codefirst.iut.uca.fr/sonar/dashboard?id=SAE-2.01) +[![Coverage](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=SAE-2.01&metric=coverage&token=6fe832930cdc587b56754b15a8c44c85c2d44401)](https://codefirst.iut.uca.fr/sonar/dashboard?id=SAE-2.01) +[![Maintainability Rating](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=SAE-2.01&metric=sqale_rating&token=6fe832930cdc587b56754b15a8c44c85c2d44401)](https://codefirst.iut.uca.fr/sonar/dashboard?id=SAE-2.01) +[![Reliability Rating](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=SAE-2.01&metric=reliability_rating&token=6fe832930cdc587b56754b15a8c44c85c2d44401)](https://codefirst.iut.uca.fr/sonar/dashboard?id=SAE-2.01) +[![Vulnerabilities](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=SAE-2.01&metric=vulnerabilities&token=6fe832930cdc587b56754b15a8c44c85c2d44401)](https://codefirst.iut.uca.fr/sonar/dashboard?id=SAE-2.01) From cd4f95f3953e123fc770f88bf548f4fd9a4e13eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20BOUHOURS?= Date: Mon, 1 May 2023 22:41:40 +0200 Subject: [PATCH 14/21] [EVAL] Evaluation blanche --- .../Evaluation 1er mai branche dev.md | 206 ++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 MCTG/Évaluation blanche/Evaluation 1er mai branche dev.md diff --git a/MCTG/Évaluation blanche/Evaluation 1er mai branche dev.md b/MCTG/Évaluation blanche/Evaluation 1er mai branche dev.md new file mode 100644 index 0000000..705dd3f --- /dev/null +++ b/MCTG/Évaluation blanche/Evaluation 1er mai branche dev.md @@ -0,0 +1,206 @@ +*Rappel :* +* ne rendez que des documents pdf, contenant l’intégralité des schémas, diagrammes, descriptions aussi bien pour la SAÉ que pour les 2 ressources, +* ne rendez qu’une seule solution faites de plusieurs projets et ressources pour vos programmes +* une évaluation blanche n'est qu'indicative : elle ne comptera pas dans la moyenne. Le soin apporté aux corrections n'est pas le même que pour l'évaluation finale et les notes blanches ne sont qu'un aperçu de votre travail à un instant t. +* Critères d’évaluation pour chaque note : + +(Notes : le barème n’est pas définitif et très susceptible d’évoluer ; il n’est donné qu’à titre indicatif ; chaque diagramme doit être accompagné de notes et d’une description écrite) + +--- + +## SAÉ2.01 : Développement d'une application : *5,26666666666667/20* +*Le sujet est choisi par le binôme mais doit être validé par l'enseignant.* + +### Documents sur la préparation de l'application et l'IHM : *15,8/20* + +#### Documentation à rendre en semaine 13: +* description du contexte [3 sur 3 points] +*OK* + +* persona [1,8 sur 2 points] +*Normalement, on ne choisit pas un persona avec un nom qui pourrait évoquer quelqu'un d'existant.* + +* user stories [3 sur 3 points] +*OK* + +* sketchs [4 sur 4 points] +*OK* + +* storyboards [3 sur 3 points] +*OK* + +* diagramme de cas d’utilisation [1 sur 5 points] +*Un acteur est sensé être relié à un cas par un trait uniquement +Pas d'accueil n'est pas un UC +Les fautes ! +Certaines flèches sont à l'envers. +Il est à reprendre, sans oublier d'ajouter les description !!* + + +### Persistance et ajouts personnels à l'application : *0/40* + +#### Documentation à rendre à la fin de la semaine 23 : +* diagramme de paquetage mettant en avant la partie persistance [ sur 2 points] +** + +* diagramme de classes mettant en avant la partie persistance [ sur 4 points] +** + +* diagramme de classes sur votre (vos) partie(s) ajoutée(s) [ sur 4 points] +** + + +#### Programmation à rendre à la fin du projet : +* persistance (XML, JSON, BDD, WebService…) [ sur 3 points] +** + +* autre ajout personnel [ sur 3 points] +** + +**fonctionnement de l’application** +* compilation [ sur 3 points] +** + +* exécution [ sur 5 points] +** + +* déploiement [ sur 2 points] +** + +* aboutissement du projet [ sur 4 points] +** + + +#### Vidéo à rendre à la fin du projet : +* vidéo de 1 à 3 minute(s) du projet [ sur 10 points] +** + + +## R2.02 : Développement d'applications avec IHM: *1,33333333333333/20* + +### Documents : *4/20* +#### Documentation à rendre en semaine 23: +* diagramme de paquetage [ sur 2 points] +** + +* diagramme de classes [4 sur 8 points] +*Quelle drôle de tête !! +Les filles de Sauveur et Loader ne sont dépendantes de personne. Ce n'est pas du tout logique. +L'interface Idisplyable est très bizarre. Je ne comprend pas ce qu'elle fait là. +Cette BaseItem me perturbe beaucoup. Quelle est son intention ? +Allez, ce n'est pas si mal !* + +* diagramme de séquence (sur quelques cas particuliers) [ sur 2 points] +** + +* description écrite de l’architecture (dont patrons de conception, dépendances…) [ sur 8 points] +** + +### Programmation : *0/40* + +#### XAML [0 sur 7 points] : +* répartition dans l’espace (layout des vues et usercontrols) [ sur 2 points] +** + +* utilisation des controls (vues et usercontrols) [ sur 1 point] +** + +* ressources, styles [ sur 2 points] +** + +* DataTemplate (locaux et globaux) [ sur 2 points] +** + + +#### C# [ sur 20 points] : +* bases (classes, structures, instances, …) [ sur 3 points] +*Pour l'instant, je n'ai qu'une classe. J'imagine que je ne suis pas sur la bonne branche. Redemandez une éval blanche pour la partie code.* + +* abstraction (héritage, interfaces, polymorphisme) [ sur 4 points] +** + +* collections simples (tableaux, listes…) [ sur 3 points] +** + +* collections avancées (dictionnaires, sets) [ sur 3 points] +** + +* encapsulation [ sur 5 points] +** + +* LINQ [ sur 1 point] +** + +* évènements (cf. module IHM) [ sur 1 point] +** + + +#### boucle Model <-> View (dont Binding) [0 sur 13 points] : +* gestion d’évènements sur la vue [ sur 2 points] +** + +* gestion d’évènements depuis le métier (notifications) [ sur 2 points] +** + +* DataBinding (sur le Master) [ sur 2 points] +** + +* DataBinding (sur le Detail) [ sur 2 points] +** + +* DataBinding sur les UserControl + Dependency Property [ sur 2 points] +** + +* gestion du Master-Detail** [ sur 3 points] +** + + +## R2.03 : Qualité de développement : *0/20* + +#### Tests [0 sur 10 points] : +* tests fonctionnels [ sur 5 points] +** + +* tests unitaires [ sur 5 points] +** + +* gestion automatique des tests (cf. plus bas) +** + +* bonus : tests unitaires d'interfaces +** + + +#### Documentation [0 sur 0 points] : +* qualité de la documentation du code [ sur 2 points] +** + +* génération de la documentation doxygen [ sur 2 points] +** + +* génération automatique de la documentation (cf. plus bas) +** + + +#### Gestion de projet [0 sur 10 points] : +* utilisation simple de git (git clone, commit, add, push, pull) [ sur 3 points] +** + +* utilisation avancée (git merge, branch, conflits) sur 2 points] +** + + +* utilisation de tickets et Merge Requests à travers la plateforme git (gitlab ou Code#0) [ sur 3 points] +** + +* mise en place de l'intégration continue (CI) pour la gestion automatique des tests et la génération de la documentation [ sur 2 points] +** + + +--- + +## Note finale R2.02 : *1,33333333333333/20* + +## Note finale R2.03 : *0/20* + +## Note finale S2.01 : *5,26666666666667/20* \ No newline at end of file From ffff0f0961c90f388520572d0b74fd98160c4324 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Tue, 2 May 2023 14:53:50 +0200 Subject: [PATCH 15/21] change CI method on dev (optimization) --- .drone.yml | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7bf0bdd..2a60a10 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,47 +7,35 @@ trigger: - push steps: - # - name: build - # image: mcr.microsoft.com/dotnet/sdk:7.0 - # volumes: - # - name: docs - # path: /docs - # commands: - # - cd MCTG/ - # - dotnet restore CI-CD.sln - # - dotnet build CI-CD.sln -c Release --no-restore - # - dotnet publish CI-CD.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release - - name: build - image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest + image: mcr.microsoft.com/dotnet/sdk:7.0 + volumes: + - name: docs + path: /docs commands: - cd MCTG/ - dotnet restore SAE-2.01.sln - - dotnet build SAE-2.01.sln -c Release --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0 - - dotnet publish MCTGApp/MCTGApp.csproj -c Release --no-restore -o CI_PROJECT_DIR/build/release - - dotnet publish Views/Views.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net7.0-android /p:AndroidSdkDirectory=/usr/lib/android-sdk + - dotnet build SAE-2.01.sln -c Release --no-restore + - dotnet publish SAE-2.01.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release - name: tests - image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest + image: mcr.microsoft.com/dotnet/sdk:7.0 commands: - cd MCTG/ - dotnet restore SAE-2.01.sln - - dotnet test SAE-2.01.sln --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0 + - dotnet test SAE-2.01.sln --no-restore depends_on: [ build ] - name: code-analysis image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7 commands: - cd MCTG/ - - cp SAE-2.01.sln CI.sln - - sed -i '30,35d' CI.sln - - sed -i '10,11d' CI.sln - - dotnet restore CI.sln + - dotnet restore SAE-2.01.sln - dotnet sonarscanner begin /k:SAE-2.01 /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 CI.sln -c Release --no-restore - - dotnet test CI.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" + - dotnet build SAE-2.01.sln -c Release --no-restore + - dotnet test SAE-2.01.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 CI.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release + - dotnet publish SAE-2.01.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN} secrets: [ SECRET_SONAR_LOGIN ] settings: From d9d3e8148e9b20bec3aecf731f9b103cee59509b Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Tue, 2 May 2023 15:49:39 +0200 Subject: [PATCH 16/21] :alembic: try new CI config --- .drone.yml | 8 +- .../ConsoleApp.csproj} | 3 +- MCTG/{MCTGApp => ConsoleApp}/Program.cs | 0 .../MCTGLib.csproj => Model/Model.csproj} | 1 + MCTG/{MCTGLib => Model}/Recipe.cs | 54 ++++----- MCTG/SAE-2.01.sln | 108 ++++++++++-------- .../Model_UnitTests.csproj} | 1 + .../UnitTest1.cs | 0 .../Usings.cs | 0 MCTG/Views/Views.csproj | 1 + 10 files changed, 94 insertions(+), 82 deletions(-) rename MCTG/{MCTGApp/MCTGApp.csproj => ConsoleApp/ConsoleApp.csproj} (70%) rename MCTG/{MCTGApp => ConsoleApp}/Program.cs (100%) rename MCTG/{MCTGLib/MCTGLib.csproj => Model/Model.csproj} (79%) rename MCTG/{MCTGLib => Model}/Recipe.cs (97%) rename MCTG/Tests/{MCTGLib_UnitTests/MCTGLib_UnitTests.csproj => Model_UnitTests/Model_UnitTests.csproj} (94%) rename MCTG/Tests/{MCTGLib_UnitTests => Model_UnitTests}/UnitTest1.cs (100%) rename MCTG/Tests/{MCTGLib_UnitTests => Model_UnitTests}/Usings.cs (100%) diff --git a/.drone.yml b/.drone.yml index 2a60a10..485c8de 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,8 +15,8 @@ steps: commands: - cd MCTG/ - dotnet restore SAE-2.01.sln - - dotnet build SAE-2.01.sln -c Release --no-restore - - dotnet publish SAE-2.01.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release + - dotnet build SAE-2.01.sln -c CI --no-restore + - dotnet publish SAE-2.01.sln -c CI --no-restore -o CI_PROJECT_DIR/build/release - name: tests image: mcr.microsoft.com/dotnet/sdk:7.0 @@ -32,10 +32,10 @@ steps: - cd MCTG/ - dotnet restore SAE-2.01.sln - dotnet sonarscanner begin /k:SAE-2.01 /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 SAE-2.01.sln -c Release --no-restore + - dotnet build SAE-2.01.sln -c CI --no-restore - dotnet test SAE-2.01.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 SAE-2.01.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release + - dotnet publish SAE-2.01.sln -c CI --no-restore -o CI_PROJECT_DIR/build/release - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN} secrets: [ SECRET_SONAR_LOGIN ] settings: diff --git a/MCTG/MCTGApp/MCTGApp.csproj b/MCTG/ConsoleApp/ConsoleApp.csproj similarity index 70% rename from MCTG/MCTGApp/MCTGApp.csproj rename to MCTG/ConsoleApp/ConsoleApp.csproj index 7517cf8..62505b1 100644 --- a/MCTG/MCTGApp/MCTGApp.csproj +++ b/MCTG/ConsoleApp/ConsoleApp.csproj @@ -5,10 +5,11 @@ net7.0 enable enable + Debug;Release;CI - + diff --git a/MCTG/MCTGApp/Program.cs b/MCTG/ConsoleApp/Program.cs similarity index 100% rename from MCTG/MCTGApp/Program.cs rename to MCTG/ConsoleApp/Program.cs diff --git a/MCTG/MCTGLib/MCTGLib.csproj b/MCTG/Model/Model.csproj similarity index 79% rename from MCTG/MCTGLib/MCTGLib.csproj rename to MCTG/Model/Model.csproj index cfadb03..fd3452d 100644 --- a/MCTG/MCTGLib/MCTGLib.csproj +++ b/MCTG/Model/Model.csproj @@ -4,6 +4,7 @@ net7.0 enable enable + Debug;Release;CI diff --git a/MCTG/MCTGLib/Recipe.cs b/MCTG/Model/Recipe.cs similarity index 97% rename from MCTG/MCTGLib/Recipe.cs rename to MCTG/Model/Recipe.cs index 83389cd..b43440b 100644 --- a/MCTG/MCTGLib/Recipe.cs +++ b/MCTG/Model/Recipe.cs @@ -1,45 +1,45 @@ using System.Text; -namespace Model -{ - public class Recipe - { - public uint Id { get; set; } - public string Title { get; set; } - public List Ingredients { get; set; } - public string Preparation { get; set; } - +namespace Model +{ + public class Recipe + { + public uint Id { get; set; } + public string Title { get; set; } + public List Ingredients { get; set; } + public string Preparation { get; set; } + /// /// Constructor of a Recipe. /// /// Identificator /// The name of the recipe /// A list of ingredient needed by the preparation - /// The text that explain the preparation of the recipe - public Recipe(uint id, string title, List ingredients, string preparation) - { - Id = id; - Title = title; - Ingredients = ingredients; - Preparation = preparation; - } - + /// The text that explain the preparation of the recipe + public Recipe(uint id, string title, List ingredients, string preparation) + { + Id = id; + Title = title; + Ingredients = ingredients; + Preparation = preparation; + } + /// /// Concatenate the list of ingredients in a single string /// - /// The list of ingredients in string format + /// The list of ingredients in string format private string ConcatIngredients() { StringBuilder sb = new StringBuilder(); foreach (string str in Ingredients) sb.Append("\t- " + str + "\n"); return sb.ToString(); - } - + } + /// /// Build a string with all elements (title, ingredients, preparation, ...) /// - /// A string that represent the recipe + /// A string that represent the recipe public override string ToString() { return $"{Title} -- id:{Id}\n\n" @@ -47,14 +47,14 @@ namespace Model + ConcatIngredients() + "\n\n" + "Preparation:\n" + $"{Preparation}\n"; - } - + } + /// /// Display the recipe in the console - /// + /// public void Display() { Console.WriteLine(this.ToString()); - } - } + } + } } \ No newline at end of file diff --git a/MCTG/SAE-2.01.sln b/MCTG/SAE-2.01.sln index f1995a2..cbadb1d 100644 --- a/MCTG/SAE-2.01.sln +++ b/MCTG/SAE-2.01.sln @@ -1,50 +1,58 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.33516.290 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MCTGApp", "MCTGApp\MCTGApp.csproj", "{666C2211-8EBB-4FC8-9484-CB93BC854153}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MCTGLib", "MCTGLib\MCTGLib.csproj", "{42FF86BD-92F9-4A32-A938-68515905378F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Views", "Views\Views.csproj", "{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MCTGLib_UnitTests", "Tests\MCTGLib_UnitTests\MCTGLib_UnitTests.csproj", "{45AB746A-194B-4E43-81EB-83B06F35AA33}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{08B80CE8-A01D-4D86-8989-AF225D5DA48C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {666C2211-8EBB-4FC8-9484-CB93BC854153}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {666C2211-8EBB-4FC8-9484-CB93BC854153}.Debug|Any CPU.Build.0 = Debug|Any CPU - {666C2211-8EBB-4FC8-9484-CB93BC854153}.Release|Any CPU.ActiveCfg = Release|Any CPU - {666C2211-8EBB-4FC8-9484-CB93BC854153}.Release|Any CPU.Build.0 = Release|Any CPU - {42FF86BD-92F9-4A32-A938-68515905378F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {42FF86BD-92F9-4A32-A938-68515905378F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {42FF86BD-92F9-4A32-A938-68515905378F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {42FF86BD-92F9-4A32-A938-68515905378F}.Release|Any CPU.Build.0 = Release|Any CPU - {508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Debug|Any CPU.Build.0 = Debug|Any CPU - {508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Release|Any CPU.ActiveCfg = Release|Any CPU - {508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Release|Any CPU.Build.0 = Release|Any CPU - {508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Release|Any CPU.Deploy.0 = Release|Any CPU - {45AB746A-194B-4E43-81EB-83B06F35AA33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45AB746A-194B-4E43-81EB-83B06F35AA33}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45AB746A-194B-4E43-81EB-83B06F35AA33}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45AB746A-194B-4E43-81EB-83B06F35AA33}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {45AB746A-194B-4E43-81EB-83B06F35AA33} = {08B80CE8-A01D-4D86-8989-AF225D5DA48C} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {ADEA5603-1EF6-4D43-9493-7D6D9DE7FA3F} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33516.290 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp", "ConsoleApp\ConsoleApp.csproj", "{666C2211-8EBB-4FC8-9484-CB93BC854153}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model", "Model\Model.csproj", "{42FF86BD-92F9-4A32-A938-68515905378F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Views", "Views\Views.csproj", "{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model_UnitTests", "Tests\Model_UnitTests\Model_UnitTests.csproj", "{45AB746A-194B-4E43-81EB-83B06F35AA33}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{08B80CE8-A01D-4D86-8989-AF225D5DA48C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + CI|Any CPU = CI|Any CPU + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {666C2211-8EBB-4FC8-9484-CB93BC854153}.CI|Any CPU.ActiveCfg = Release|Any CPU + {666C2211-8EBB-4FC8-9484-CB93BC854153}.CI|Any CPU.Build.0 = Release|Any CPU + {666C2211-8EBB-4FC8-9484-CB93BC854153}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {666C2211-8EBB-4FC8-9484-CB93BC854153}.Debug|Any CPU.Build.0 = Debug|Any CPU + {666C2211-8EBB-4FC8-9484-CB93BC854153}.Release|Any CPU.ActiveCfg = Release|Any CPU + {666C2211-8EBB-4FC8-9484-CB93BC854153}.Release|Any CPU.Build.0 = Release|Any CPU + {42FF86BD-92F9-4A32-A938-68515905378F}.CI|Any CPU.ActiveCfg = Release|Any CPU + {42FF86BD-92F9-4A32-A938-68515905378F}.CI|Any CPU.Build.0 = Release|Any CPU + {42FF86BD-92F9-4A32-A938-68515905378F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42FF86BD-92F9-4A32-A938-68515905378F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42FF86BD-92F9-4A32-A938-68515905378F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42FF86BD-92F9-4A32-A938-68515905378F}.Release|Any CPU.Build.0 = Release|Any CPU + {508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.CI|Any CPU.ActiveCfg = CI|Any CPU + {508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Debug|Any CPU.Build.0 = Debug|Any CPU + {508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Release|Any CPU.ActiveCfg = Release|Any CPU + {508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Release|Any CPU.Build.0 = Release|Any CPU + {508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Release|Any CPU.Deploy.0 = Release|Any CPU + {45AB746A-194B-4E43-81EB-83B06F35AA33}.CI|Any CPU.ActiveCfg = Release|Any CPU + {45AB746A-194B-4E43-81EB-83B06F35AA33}.CI|Any CPU.Build.0 = Release|Any CPU + {45AB746A-194B-4E43-81EB-83B06F35AA33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45AB746A-194B-4E43-81EB-83B06F35AA33}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45AB746A-194B-4E43-81EB-83B06F35AA33}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45AB746A-194B-4E43-81EB-83B06F35AA33}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {45AB746A-194B-4E43-81EB-83B06F35AA33} = {08B80CE8-A01D-4D86-8989-AF225D5DA48C} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {ADEA5603-1EF6-4D43-9493-7D6D9DE7FA3F} + EndGlobalSection +EndGlobal diff --git a/MCTG/Tests/MCTGLib_UnitTests/MCTGLib_UnitTests.csproj b/MCTG/Tests/Model_UnitTests/Model_UnitTests.csproj similarity index 94% rename from MCTG/Tests/MCTGLib_UnitTests/MCTGLib_UnitTests.csproj rename to MCTG/Tests/Model_UnitTests/Model_UnitTests.csproj index 42ff44d..423f4e0 100644 --- a/MCTG/Tests/MCTGLib_UnitTests/MCTGLib_UnitTests.csproj +++ b/MCTG/Tests/Model_UnitTests/Model_UnitTests.csproj @@ -7,6 +7,7 @@ false true + Debug;Release;CI diff --git a/MCTG/Tests/MCTGLib_UnitTests/UnitTest1.cs b/MCTG/Tests/Model_UnitTests/UnitTest1.cs similarity index 100% rename from MCTG/Tests/MCTGLib_UnitTests/UnitTest1.cs rename to MCTG/Tests/Model_UnitTests/UnitTest1.cs diff --git a/MCTG/Tests/MCTGLib_UnitTests/Usings.cs b/MCTG/Tests/Model_UnitTests/Usings.cs similarity index 100% rename from MCTG/Tests/MCTGLib_UnitTests/Usings.cs rename to MCTG/Tests/Model_UnitTests/Usings.cs diff --git a/MCTG/Views/Views.csproj b/MCTG/Views/Views.csproj index b1615cc..2693436 100644 --- a/MCTG/Views/Views.csproj +++ b/MCTG/Views/Views.csproj @@ -30,6 +30,7 @@ 10.0.17763.0 10.0.17763.0 6.5 + Debug;Release;CI From 06570424464a845c58f2697368e8f3b3f42abe31 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Tue, 2 May 2023 16:02:42 +0200 Subject: [PATCH 17/21] :alembic: try new CI config (2) --- .drone.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 485c8de..f04b861 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,7 +14,9 @@ steps: path: /docs commands: - cd MCTG/ - - dotnet restore SAE-2.01.sln + - dotnet restore .\ConsoleApp\ConsoleApp.csproj + - dotnet restore .\Model\Model.csproj + - dotnet restore .\Tests\Model_UnitTests\Model_UnitTests.csproj - dotnet build SAE-2.01.sln -c CI --no-restore - dotnet publish SAE-2.01.sln -c CI --no-restore -o CI_PROJECT_DIR/build/release @@ -22,7 +24,9 @@ steps: image: mcr.microsoft.com/dotnet/sdk:7.0 commands: - cd MCTG/ - - dotnet restore SAE-2.01.sln + - dotnet restore .\ConsoleApp\ConsoleApp.csproj + - dotnet restore .\Model\Model.csproj + - dotnet restore .\Tests\Model_UnitTests\Model_UnitTests.csproj - dotnet test SAE-2.01.sln --no-restore depends_on: [ build ] @@ -30,7 +34,9 @@ steps: image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7 commands: - cd MCTG/ - - dotnet restore SAE-2.01.sln + - dotnet restore .\ConsoleApp\ConsoleApp.csproj + - dotnet restore .\Model\Model.csproj + - dotnet restore .\Tests\Model_UnitTests\Model_UnitTests.csproj - dotnet sonarscanner begin /k:SAE-2.01 /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 SAE-2.01.sln -c CI --no-restore - dotnet test SAE-2.01.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" From 83e9a99b431f457e27714c14dad19a1cbc033af9 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Tue, 2 May 2023 16:08:01 +0200 Subject: [PATCH 18/21] :alembic: try new CI config (3) --- .drone.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index f04b861..0e8d108 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,9 +14,9 @@ steps: path: /docs commands: - cd MCTG/ - - dotnet restore .\ConsoleApp\ConsoleApp.csproj - - dotnet restore .\Model\Model.csproj - - dotnet restore .\Tests\Model_UnitTests\Model_UnitTests.csproj + - dotnet restore ./ConsoleApp/ConsoleApp.csproj + - dotnet restore ./Model/Model.csproj + - dotnet restore ./Tests/Model_UnitTests\Model_UnitTests.csproj - dotnet build SAE-2.01.sln -c CI --no-restore - dotnet publish SAE-2.01.sln -c CI --no-restore -o CI_PROJECT_DIR/build/release @@ -24,9 +24,9 @@ steps: image: mcr.microsoft.com/dotnet/sdk:7.0 commands: - cd MCTG/ - - dotnet restore .\ConsoleApp\ConsoleApp.csproj - - dotnet restore .\Model\Model.csproj - - dotnet restore .\Tests\Model_UnitTests\Model_UnitTests.csproj + - dotnet restore ./ConsoleApp/ConsoleApp.csproj + - dotnet restore ./Model/Model.csproj + - dotnet restore ./Tests/Model_UnitTests\Model_UnitTests.csproj - dotnet test SAE-2.01.sln --no-restore depends_on: [ build ] @@ -34,9 +34,9 @@ steps: image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7 commands: - cd MCTG/ - - dotnet restore .\ConsoleApp\ConsoleApp.csproj - - dotnet restore .\Model\Model.csproj - - dotnet restore .\Tests\Model_UnitTests\Model_UnitTests.csproj + - dotnet restore ./ConsoleApp/ConsoleApp.csproj + - dotnet restore ./Model/Model.csproj + - dotnet restore ./Tests/Model_UnitTests\Model_UnitTests.csproj - dotnet sonarscanner begin /k:SAE-2.01 /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 SAE-2.01.sln -c CI --no-restore - dotnet test SAE-2.01.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" From 1b46ba9c739c1a9102d5993538cd6fb1e7249688 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Tue, 2 May 2023 16:09:07 +0200 Subject: [PATCH 19/21] :alembic: try new CI config (4) --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0e8d108..4a017aa 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,7 +16,7 @@ steps: - cd MCTG/ - dotnet restore ./ConsoleApp/ConsoleApp.csproj - dotnet restore ./Model/Model.csproj - - dotnet restore ./Tests/Model_UnitTests\Model_UnitTests.csproj + - dotnet restore ./Tests/Model_UnitTests/Model_UnitTests.csproj - dotnet build SAE-2.01.sln -c CI --no-restore - dotnet publish SAE-2.01.sln -c CI --no-restore -o CI_PROJECT_DIR/build/release @@ -26,7 +26,7 @@ steps: - cd MCTG/ - dotnet restore ./ConsoleApp/ConsoleApp.csproj - dotnet restore ./Model/Model.csproj - - dotnet restore ./Tests/Model_UnitTests\Model_UnitTests.csproj + - dotnet restore ./Tests/Model_UnitTests/Model_UnitTests.csproj - dotnet test SAE-2.01.sln --no-restore depends_on: [ build ] @@ -36,7 +36,7 @@ steps: - cd MCTG/ - dotnet restore ./ConsoleApp/ConsoleApp.csproj - dotnet restore ./Model/Model.csproj - - dotnet restore ./Tests/Model_UnitTests\Model_UnitTests.csproj + - dotnet restore ./Tests/Model_UnitTests/Model_UnitTests.csproj - dotnet sonarscanner begin /k:SAE-2.01 /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 SAE-2.01.sln -c CI --no-restore - dotnet test SAE-2.01.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" From 9f43c7bb7c6353b20fe65b5a0abbd7594779ac3f Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Tue, 2 May 2023 16:10:07 +0200 Subject: [PATCH 20/21] :alembic: try new CI config (5) --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 4a017aa..5222ff8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -27,7 +27,7 @@ steps: - dotnet restore ./ConsoleApp/ConsoleApp.csproj - dotnet restore ./Model/Model.csproj - dotnet restore ./Tests/Model_UnitTests/Model_UnitTests.csproj - - dotnet test SAE-2.01.sln --no-restore + - dotnet test SAE-2.01.sln -c CI --no-restore depends_on: [ build ] - name: code-analysis From a574327ae69d98df76729d500dbc41c9f139e405 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Tue, 2 May 2023 16:11:01 +0200 Subject: [PATCH 21/21] :alembic: try new CI config (6) --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 5222ff8..4e68727 100644 --- a/.drone.yml +++ b/.drone.yml @@ -39,7 +39,7 @@ steps: - dotnet restore ./Tests/Model_UnitTests/Model_UnitTests.csproj - dotnet sonarscanner begin /k:SAE-2.01 /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 SAE-2.01.sln -c CI --no-restore - - dotnet test SAE-2.01.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" + - dotnet test SAE-2.01.sln -c CI --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 SAE-2.01.sln -c CI --no-restore -o CI_PROJECT_DIR/build/release - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}