test nouvelle pipeline
continuous-integration/drone/push Build is failing Details

Popup_qui_marche_pas
Anthony RICHARD 2 years ago
parent 301e8ebd0a
commit e7da6cc973

@ -8,31 +8,31 @@ trigger:
steps:
- name: build
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest
image: mcr.microsoft.com/dotnet/sdk:7.0
commands:
- cd Sources/
- dotnet restore Stim.sln
- dotnet build Stim.sln -c Release --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0
- dotnet publish Stim/Stim.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net7.0-android /p:AndroidSdkDirectory=/usr/lib/android-sdk
- dotnet restore TestPipeline.sln
- dotnet build TestPipeline.sln -c Release --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0
- dotnet publish Stim/TestPipeline.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net7.0-android /p:AndroidSdkDirectory=/usr/lib/android-sdk
- name: tests
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest
image: mcr.microsoft.com/dotnet/sdk:7.0
commands:
- cd Sources/
- dotnet restore Stim.sln
- dotnet test Stim.sln --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0
- dotnet restore TestPipeline.sln
- dotnet test TestPipeline.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
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7
commands:
- cd Sources/
- dotnet restore Stim.sln
- dotnet restore TestPipeline.sln
- dotnet sonarscanner begin /k:Projet_IHM /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 Stim.sln -c Release --no-restore
- dotnet test Stim.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
- dotnet build TestPipeline.sln -c Release --no-restore
- dotnet test TestPipeline.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 Stim.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
- dotnet publish TestPipeline.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:

@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33424.131
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestPipeline", "TestPipeline\TestPipeline.csproj", "{DC0B04CC-C4B6-4221-AD4A-98FEEC1A6E8C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model", "..\Stim.Model\Model.csproj", "{E56E9419-1E68-4C13-9301-54C4630D7A43}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test", "..\TestProject1\Test.csproj", "{DEF64C4E-BF42-4CDA-BE95-62DD8B01365C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DC0B04CC-C4B6-4221-AD4A-98FEEC1A6E8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DC0B04CC-C4B6-4221-AD4A-98FEEC1A6E8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DC0B04CC-C4B6-4221-AD4A-98FEEC1A6E8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DC0B04CC-C4B6-4221-AD4A-98FEEC1A6E8C}.Release|Any CPU.Build.0 = Release|Any CPU
{E56E9419-1E68-4C13-9301-54C4630D7A43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E56E9419-1E68-4C13-9301-54C4630D7A43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E56E9419-1E68-4C13-9301-54C4630D7A43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E56E9419-1E68-4C13-9301-54C4630D7A43}.Release|Any CPU.Build.0 = Release|Any CPU
{DEF64C4E-BF42-4CDA-BE95-62DD8B01365C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DEF64C4E-BF42-4CDA-BE95-62DD8B01365C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DEF64C4E-BF42-4CDA-BE95-62DD8B01365C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DEF64C4E-BF42-4CDA-BE95-62DD8B01365C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5D28C76C-B599-49C7-8CC2-30F448740700}
EndGlobalSection
EndGlobal

@ -0,0 +1,2 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

@ -42,7 +42,7 @@ namespace Test
{
string[] tags = { "tag 1", "tag 2", "tag 3" };
Game game = new("Nom Jeu", "Description du jeu", 2022, tags);
Review rev1 = new Review(3.5f, "Review n°1"), rev2 = new Review(3.5f, "Review n°2"), rev3 = new Review(3.5f, "Review n°3"), rev4 = new Review(3.5f, "Review n°4");
Review rev1 = new(3.5f, "Review n°1"), rev2 = new(3.5f, "Review n°2"), rev3 = new(3.5f, "Review n°3"), rev4 = new(3.5f, "Review n°4");
game.AddReview(rev1);
game.AddReview(rev2);

Loading…
Cancel
Save