From 6ec1e1cdc29753eaf9888df1ae36740d8f8a27ef Mon Sep 17 00:00:00 2001 From: "maxime.BATISTA@etu.uca.fr" Date: Mon, 8 May 2023 23:27:56 +0200 Subject: [PATCH] add .drone.yaml with test CI --- .drone.yml | 13 +++++----- ShoopNCook.csproj | 23 ++++++++++++++++-- ShoopNCook.sln | 59 +++++++++++++++++++++++++--------------------- Tests/Tests.csproj | 25 ++++++++++++++++++++ Tests/UnitTest1.cs | 13 ++++++++++ Tests/Usings.cs | 1 + 6 files changed, 98 insertions(+), 36 deletions(-) create mode 100644 Tests/Tests.csproj create mode 100644 Tests/UnitTest1.cs create mode 100644 Tests/Usings.cs diff --git a/.drone.yml b/.drone.yml index e21fbfe..78af971 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,10 +1,9 @@ -kind: pipeline -name: "Front CI" +kind: pipeline type: docker +name: CI Workflow -steps: - - name: "Build APK" - image: mono:latest +steps: + - name: Build + image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest commands: - - dotnet workload install maui - - dotnet build -f net7.0-android -c Release \ No newline at end of file + - dotnet test --framework net7.0 'Tests\\\\Tests.csproj' diff --git a/ShoopNCook.csproj b/ShoopNCook.csproj index 2a3de7b..e727121 100644 --- a/ShoopNCook.csproj +++ b/ShoopNCook.csproj @@ -1,7 +1,7 @@  - net7.0-android;net7.0-ios;net7.0-maccatalyst + net7.0;net7.0-android $(TargetFrameworks);net7.0-windows10.0.19041.0 @@ -45,6 +45,21 @@ + + + + + + + + + + + + + + + @@ -150,6 +165,10 @@ - + + + + + diff --git a/ShoopNCook.sln b/ShoopNCook.sln index 75a7ef6..7ffa604 100644 --- a/ShoopNCook.sln +++ b/ShoopNCook.sln @@ -1,27 +1,32 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31611.283 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShoopNCook", "ShoopNCook.csproj", "{8ED2FB1D-C04D-478D-9271-CC91FE110396}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.Build.0 = Release|Any CPU - {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.Deploy.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31611.283 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShoopNCook", "ShoopNCook.csproj", "{8ED2FB1D-C04D-478D-9271-CC91FE110396}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{E50D92DC-0BB1-4998-B085-EF47C55675AC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.Build.0 = Release|Any CPU + {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.Deploy.0 = Release|Any CPU + {E50D92DC-0BB1-4998-B085-EF47C55675AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E50D92DC-0BB1-4998-B085-EF47C55675AC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E50D92DC-0BB1-4998-B085-EF47C55675AC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E50D92DC-0BB1-4998-B085-EF47C55675AC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572} + EndGlobalSection +EndGlobal diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj new file mode 100644 index 0000000..42ff44d --- /dev/null +++ b/Tests/Tests.csproj @@ -0,0 +1,25 @@ + + + + net7.0 + enable + enable + + false + true + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + diff --git a/Tests/UnitTest1.cs b/Tests/UnitTest1.cs new file mode 100644 index 0000000..f5782ed --- /dev/null +++ b/Tests/UnitTest1.cs @@ -0,0 +1,13 @@ +namespace Tests +{ + public class UnitTest1 + { + [Fact] + public void Test1() + { + + } + } + +} + diff --git a/Tests/Usings.cs b/Tests/Usings.cs new file mode 100644 index 0000000..8c927eb --- /dev/null +++ b/Tests/Usings.cs @@ -0,0 +1 @@ +global using Xunit; \ No newline at end of file