Compare commits
19 Commits
e140df2257
...
visualCove
| Author | SHA1 | Date | |
|---|---|---|---|
| cf5e17f430 | |||
| 44a4ed95f5 | |||
| 7e52bd0e33 | |||
| 516bd3cf87 | |||
| 6377884651 | |||
| 05804114b4 | |||
| ea7a32d0c9 | |||
| 9b1d573231 | |||
| 33155d788d | |||
| 73ba6d36a2 | |||
| c656206513 | |||
|
|
55750bb5e5 | ||
|
|
9f9032d9af | ||
|
|
effa82a069 | ||
|
|
25a4d10229 | ||
|
|
ebc50f693d | ||
|
|
396d8070d5 | ||
|
|
6342cc4296 | ||
|
|
bf67c69899 |
@@ -8,14 +8,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
dotnet-version: [ '8.0.x' ]
|
dotnet-version: [ '10.0.x' ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '10.0.x'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: dotnet restore ./src/LittleTown.sln
|
run: dotnet restore ./src/LittleTown.sln
|
||||||
- name: Build
|
- name: Build
|
||||||
|
|||||||
@@ -24,28 +24,45 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the code
|
- name: Check out the code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
8.x
|
10.x
|
||||||
- name: "Restore/Build/Test"
|
- name: "Restore/Build/Test"
|
||||||
run: |
|
run: |
|
||||||
dotnet test ./src/LittleTown.sln --configuration Release --verbosity normal --logger trx --collect:"XPlat Code Coverage" --logger:"trx;LogFileName=test_results.xml"
|
dotnet test ./src/LittleTown.sln --configuration Release --verbosity normal --logger trx --collect:"XPlat Code Coverage" --logger:"trx;LogFileName=test_results.xml"
|
||||||
- name: Combine Coverage Reports # This is because one report is produced per project, and we want one result for all of them.
|
- name: Combine Coverage Reports # This is because one report is produced per project, and we want one result for all of them.
|
||||||
uses: danielpalme/ReportGenerator-GitHub-Action@5.3.8
|
uses: danielpalme/ReportGenerator-GitHub-Action@v5.5.1
|
||||||
with:
|
with:
|
||||||
reports: "**/*.cobertura.xml" # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
|
reports: "**/*.cobertura.xml" # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
|
||||||
targetdir: "${{ github.workspace }}" # REQUIRED # The directory where the generated report should be saved.
|
targetdir: "coverage-report" # REQUIRED # The directory where the generated report should be saved.
|
||||||
reporttypes: "Cobertura" # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, Html_Dark, Html_Light, Html_BlueRed, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlInline_AzurePipelines_Light, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MarkdownSummary, MarkdownSummaryGithub, MarkdownDeltaSummary, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, TextDeltaSummary, Xml, XmlSummary
|
reporttypes: "Html;MarkdownSummary;Cobertura" # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, Html_Dark, Html_Light, Html_BlueRed, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlInline_AzurePipelines_Light, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MarkdownSummary, MarkdownSummaryGithub, MarkdownDeltaSummary, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, TextDeltaSummary, Xml, XmlSummary
|
||||||
verbosity: "Info" # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
|
verbosity: "Info" # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
|
||||||
title: "Code Coverage" # Optional title.
|
title: "Code Coverage" # Optional title.
|
||||||
tag: "${{ github.run_number }}_${{ github.run_id }}" # Optional tag or build version.
|
tag: "${{ github.run_number }}_${{ github.run_id }}" # Optional tag or build version.
|
||||||
customSettings: "" # Optional custom settings (separated by semicolon). See: https://github.com/danielpalme/ReportGenerator/wiki/Settings.
|
customSettings: "" # Optional custom settings (separated by semicolon). See: https://github.com/danielpalme/ReportGenerator/wiki/Settings.
|
||||||
toolpath: "reportgeneratortool" # Default directory for installing the dotnet tool.
|
toolpath: "reportgeneratortool" # Default directory for installing the dotnet tool.
|
||||||
|
- name: Upload coverage report (debug)
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coverage-report
|
||||||
|
path: coverage-report/
|
||||||
|
if-no-files-found: error
|
||||||
|
- name: Publish coverage to pages
|
||||||
|
run: ls coverage-report
|
||||||
|
- name: Upload coverage via SSH
|
||||||
|
uses: appleboy/scp-action@v1
|
||||||
|
with:
|
||||||
|
host: "192.168.1.103"
|
||||||
|
username: "gitea"
|
||||||
|
password: "password"
|
||||||
|
port: 2222
|
||||||
|
source: "coverage-report/*"
|
||||||
|
target: "/config/test"
|
||||||
- name: Upload Combined Coverage XML
|
- name: Upload Combined Coverage XML
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<InvariantGlobalization>true</InvariantGlobalization>
|
<InvariantGlobalization>true</InvariantGlobalization>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.23" />
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.2" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.9.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
|
||||||
@@ -10,16 +10,16 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
<PackageReference Include="AutoMapper" Version="16.0.0" />
|
||||||
<PackageReference Include="Microsoft.CodeCoverage" Version="17.11.0" />
|
<PackageReference Include="Microsoft.CodeCoverage" Version="17.14.1" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
|
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
|
||||||
<PackageReference Include="xunit" Version="2.4.2" />
|
<PackageReference Include="xunit" Version="2.9.2" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="coverlet.collector" Version="6.0.0">
|
<PackageReference Include="coverlet.collector" Version="6.0.4">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
|||||||
@@ -12,4 +12,10 @@ public class EmptyAction : IAction
|
|||||||
|
|
||||||
match.NextPlayer();
|
match.NextPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public bool CanExecute(Match match)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
19
src/LittleTown.Core/UseCases/Actions/FieldAction.cs
Normal file
19
src/LittleTown.Core/UseCases/Actions/FieldAction.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
namespace LittleTown.Core.Actions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Action qui consiste a poser un pion sur le une case du plateau
|
||||||
|
/// </summary>
|
||||||
|
public class FieldAction : IAction
|
||||||
|
{
|
||||||
|
/// <inheritdoc/>>
|
||||||
|
public void Execute(Match match)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>>
|
||||||
|
public bool CanExecute(Match match)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,4 +10,11 @@ public interface IAction
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="match">le match a modifier avec cette action</param>
|
/// <param name="match">le match a modifier avec cette action</param>
|
||||||
public void Execute(Match match);
|
public void Execute(Match match);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verifier si cette action peut être effectuée, si elle est légale
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="match"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool CanExecute(Match match);
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
|||||||
Reference in New Issue
Block a user