add .drone.yaml with test CI
continuous-integration/drone/push Build is passing Details

pull/40/head
maxime.BATISTA@etu.uca.fr 2 years ago
parent d3cf0662b7
commit 6ec1e1cdc2

@ -1,10 +1,9 @@
kind: pipeline kind: pipeline
name: "Front CI"
type: docker type: docker
name: CI Workflow
steps: steps:
- name: "Build APK" - name: Build
image: mono:latest image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest
commands: commands:
- dotnet workload install maui - dotnet test --framework net7.0 'Tests\\\\Tests.csproj'
- dotnet build -f net7.0-android -c Release

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks> <TargetFrameworks>net7.0;net7.0-android</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks> <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET --> <!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> --> <!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
@ -45,6 +45,21 @@
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" /> <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<AndroidResource Remove="ShopNCookTests\**" />
<AndroidResource Remove="Tests\**" />
<Compile Remove="ShopNCookTests\**" />
<Compile Remove="Tests\**" />
<EmbeddedResource Remove="ShopNCookTests\**" />
<EmbeddedResource Remove="Tests\**" />
<MauiCss Remove="ShopNCookTests\**" />
<MauiCss Remove="Tests\**" />
<MauiXaml Remove="ShopNCookTests\**" />
<MauiXaml Remove="Tests\**" />
<None Remove="ShopNCookTests\**" />
<None Remove="Tests\**" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Remove="Resources\Fonts\Poppins-Bold.ttf" /> <None Remove="Resources\Fonts\Poppins-Bold.ttf" />
<None Remove="Resources\Fonts\Poppins-Medium.ttf" /> <None Remove="Resources\Fonts\Poppins-Medium.ttf" />
@ -150,6 +165,10 @@
</MauiXaml> </MauiXaml>
</ItemGroup> </ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties XamarinHotReloadDebuggerTimeoutExceptionShoopNCookHideInfoBar="True" XamarinHotReloadUnhandledDeviceExceptionShoopNCookHideInfoBar="True" /></VisualStudio></ProjectExtensions> <ProjectExtensions>
<VisualStudio>
<UserProperties XamarinHotReloadDebuggerTimeoutExceptionShoopNCookHideInfoBar="True" XamarinHotReloadUnhandledDeviceExceptionShoopNCookHideInfoBar="True" />
</VisualStudio>
</ProjectExtensions>
</Project> </Project>

@ -1,10 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.0.31611.283 VisualStudioVersion = 17.0.31611.283
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShoopNCook", "ShoopNCook.csproj", "{8ED2FB1D-C04D-478D-9271-CC91FE110396}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShoopNCook", "ShoopNCook.csproj", "{8ED2FB1D-C04D-478D-9271-CC91FE110396}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{E50D92DC-0BB1-4998-B085-EF47C55675AC}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -17,6 +18,10 @@ Global
{8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.ActiveCfg = Release|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.Build.0 = Release|Any CPU
{8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.Deploy.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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>

@ -0,0 +1,13 @@
namespace Tests
{
public class UnitTest1
{
[Fact]
public void Test1()
{
}
}
}

@ -0,0 +1 @@
global using Xunit;
Loading…
Cancel
Save