Compare commits

...

2 Commits

Author SHA1 Message Date
025999ab59 Updating to .Net 8.0.
Some checks failed
ydeng/gameservicewarden/pipeline/head There was a failure building this commit
2024-07-20 15:03:57 +00:00
3b69b8666c Removed unused logging module. 2024-07-20 15:03:44 +00:00
21 changed files with 110 additions and 81 deletions

11
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM mcr.microsoft.com/devcontainers/anaconda:1-3
# Copy environment.yml (if found) to a temp location so we update the environment. Also
# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists.
COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/
RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \
&& rm -rf /tmp/conda-tmp
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

View File

@ -0,0 +1,30 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/anaconda
{
"name": "Anaconda (Python 3)",
"build": {
"context": "..",
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.vscode-dotnet-runtime",
"svelte.svelte-vscode",
"syler.sass-indented",
"dbaeumer.vscode-eslint",
"ms-dotnettools.csharp"
],
"settings": {
"python.defaultInterpreterPath": "/opt/conda/bin/python",
"dotnet.dotnetPath": "/opt/conda/lib/dotnet/",
"omnisharp.dotNetCliPaths": [
"/opt/conda/lib/dotnet/dotnet"
]
}
}
},
"postCreateCommand": "bash -i -c 'conda init'"
}

3
.devcontainer/noop.txt Normal file
View File

@ -0,0 +1,3 @@
This file copied into the container along with environment.yml* from the parent
folder. This file is included to prevents the Dockerfile COPY instruction from
failing if no environment.yml is found.

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "SimpleLogger"]
path = SimpleLogger
url = https://sys.reslate.net/git/ydeng/SimpleLogger.git

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>
@ -17,7 +17,6 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\GameServiceWarden\GameServiceWarden.Core\GameServiceWarden.Core.csproj" /> <ProjectReference Include="..\..\GameServiceWarden\GameServiceWarden.Core\GameServiceWarden.Core.csproj" />
<ProjectReference Include="..\..\GameServiceWarden\GameServiceWarden.ModuleFramework\GameServiceWarden.ModuleFramework.csproj" /> <ProjectReference Include="..\..\GameServiceWarden\GameServiceWarden.ModuleFramework\GameServiceWarden.ModuleFramework.csproj" />
<ProjectReference Include="..\..\SimpleLogger\SimpleLogger.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -4,7 +4,6 @@ using GameServiceWarden.Core.Module;
using GameServiceWarden.ModuleFramework; using GameServiceWarden.ModuleFramework;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;
using SimpleLogger;
namespace GameServiceWarden.Core.Tests.Modules namespace GameServiceWarden.Core.Tests.Modules
{ {

View File

@ -1,7 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using GameServiceWarden.Core.Module; using GameServiceWarden.Core.Module;
using SimpleLogger;
using GameServiceWarden.ModuleFramework; using GameServiceWarden.ModuleFramework;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;

View File

@ -1,5 +1,4 @@
using System; using System;
using SimpleLogger;
using GameServiceWarden.Core.UI; using GameServiceWarden.Core.UI;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;

View File

@ -1,5 +1,4 @@
using System; using System;
using SimpleLogger;
using Xunit.Abstractions; using Xunit.Abstractions;
namespace GameServiceWarden.Core.Tests namespace GameServiceWarden.Core.Tests

View File

@ -1,22 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameServiceWarden.Core.Tests", "GameServiceWarden.Core.Tests\GameServiceWarden.Core.Tests.csproj", "{59D37458-41F3-478C-BDE6-CF33EC667701}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{59D37458-41F3-478C-BDE6-CF33EC667701}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{59D37458-41F3-478C-BDE6-CF33EC667701}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59D37458-41F3-478C-BDE6-CF33EC667701}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59D37458-41F3-478C-BDE6-CF33EC667701}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@ -3,12 +3,11 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\GameServiceWarden.ModuleFramework\GameServiceWarden.ModuleFramework.csproj" /> <ProjectReference Include="..\GameServiceWarden.ModuleFramework\GameServiceWarden.ModuleFramework.csproj" />
<ProjectReference Include="..\GameServiceWarden.InteractionAPI\GameServiceWarden.InteractionAPI.csproj" /> <ProjectReference Include="..\GameServiceWarden.InteractionAPI\GameServiceWarden.InteractionAPI.csproj" />
<ProjectReference Include="..\..\SimpleLogger\SimpleLogger.csproj" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -10,7 +10,6 @@ using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using GameServiceWarden.Core.Module.Exceptions; using GameServiceWarden.Core.Module.Exceptions;
using SimpleLogger;
using GameServiceWarden.ModuleFramework; using GameServiceWarden.ModuleFramework;
using System.Net.Sockets; using System.Net.Sockets;

View File

@ -3,7 +3,6 @@ using System.Text.Json;
using GameServiceWarden.InteractionAPI; using GameServiceWarden.InteractionAPI;
using GameServiceWarden.InteractionAPI.Communicable.Requests; using GameServiceWarden.InteractionAPI.Communicable.Requests;
using GameServiceWarden.Core.Module; using GameServiceWarden.Core.Module;
using SimpleLogger;
namespace GameServiceWarden.Core.UI namespace GameServiceWarden.Core.UI
{ {

View File

@ -10,7 +10,6 @@ using System.Threading.Tasks;
using GameServiceWarden.InteractionAPI; using GameServiceWarden.InteractionAPI;
using GameServiceWarden.InteractionAPI.Communicable.Requests; using GameServiceWarden.InteractionAPI.Communicable.Requests;
using GameServiceWarden.InteractionAPI.Communicable.Responses; using GameServiceWarden.InteractionAPI.Communicable.Responses;
using SimpleLogger;
namespace GameServiceWarden.Core.UI namespace GameServiceWarden.Core.UI
{ {

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -1,34 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameServiceWarden.Core", "GameServiceWarden.Core\GameServiceWarden.Core.csproj", "{72FE4FFA-8730-4043-BCE9-794E816542CA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameServiceWarden.InteractionAPI", "GameServiceWarden.InteractionAPI\GameServiceWarden.InteractionAPI.csproj", "{A254A364-8089-4799-8F45-02E683D59F75}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameServiceWarden.ModuleFramework", "GameServiceWarden.ModuleFramework\GameServiceWarden.ModuleFramework.csproj", "{23F7A773-D146-4522-8200-BDD60E39B79F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{72FE4FFA-8730-4043-BCE9-794E816542CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72FE4FFA-8730-4043-BCE9-794E816542CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72FE4FFA-8730-4043-BCE9-794E816542CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{72FE4FFA-8730-4043-BCE9-794E816542CA}.Release|Any CPU.Build.0 = Release|Any CPU
{A254A364-8089-4799-8F45-02E683D59F75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A254A364-8089-4799-8F45-02E683D59F75}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A254A364-8089-4799-8F45-02E683D59F75}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A254A364-8089-4799-8F45-02E683D59F75}.Release|Any CPU.Build.0 = Release|Any CPU
{23F7A773-D146-4522-8200-BDD60E39B79F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23F7A773-D146-4522-8200-BDD60E39B79F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23F7A773-D146-4522-8200-BDD60E39B79F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23F7A773-D146-4522-8200-BDD60E39B79F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

17
Jenkinsfile vendored
View File

@ -1,18 +1,21 @@
pipeline { pipeline {
agent any agent {
kubernetes {
cloud 'Reslate Systems'
defaultContainer 'conda'
}
}
stages { stages {
stage ("Install") { stage ("Install") {
steps { steps {
sh "mamba env update --file environment.yml" sh "conda update conda -y -q"
sh "echo 'mamba activate gameservicewarden' >> ~/.bashrc" sh "conda env update -n base --file environment.yml"
sh "git submodule update --init --recursive" sh "conda run -n base dotnet restore gameservicewarden.sln"
sh "dotnet restore GameServiceWarden"
sh "dotnet restore GameServiceWarden.Tests"
} }
} }
stage ("Test") { stage ("Test") {
steps { steps {
sh "dotnet test --logger xunit --no-restore GameServiceWarden.Tests" sh "conda run -n base dotnet test --logger xunit --no-restore GameServiceWarden.Tests"
xunit([xUnitDotNet(excludesPattern: '', pattern: 'GameServiceWarden.Tests/*.Tests/TestResults/*.xml', stopProcessingIfError: true)]) xunit([xUnitDotNet(excludesPattern: '', pattern: 'GameServiceWarden.Tests/*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
} }
} }

@ -1 +0,0 @@
Subproject commit f9931eea4295353befffcf1880ea510cc259e9f2

View File

@ -2,4 +2,5 @@ name: gameservicewarden
channels: channels:
- conda-forge - conda-forge
dependencies: dependencies:
- dotnet-sdk=7.0.* - dotnet
- icu

50
gameservicewarden.sln Normal file
View File

@ -0,0 +1,50 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GameServiceWarden", "GameServiceWarden", "{10373EAF-A78D-45C0-8F8E-FFA1F1D4DF33}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameServiceWarden.Core", "GameServiceWarden\GameServiceWarden.Core\GameServiceWarden.Core.csproj", "{3F7158B1-8C80-4529-9B1B-827329F699A7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameServiceWarden.InteractionAPI", "GameServiceWarden\GameServiceWarden.InteractionAPI\GameServiceWarden.InteractionAPI.csproj", "{0DF20C89-C55C-401F-A607-A41A6EC6273E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameServiceWarden.ModuleFramework", "GameServiceWarden\GameServiceWarden.ModuleFramework\GameServiceWarden.ModuleFramework.csproj", "{26B4678F-A48E-4A81-A304-3179D7C984E8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GameServiceWarden.Tests", "GameServiceWarden.Tests", "{103BE93B-FB65-47AC-8741-90823A23A23E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameServiceWarden.Core.Tests", "GameServiceWarden.Tests\GameServiceWarden.Core.Tests\GameServiceWarden.Core.Tests.csproj", "{48DD5E4F-1C9F-4642-AF7C-B43E91E83BB2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3F7158B1-8C80-4529-9B1B-827329F699A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F7158B1-8C80-4529-9B1B-827329F699A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F7158B1-8C80-4529-9B1B-827329F699A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F7158B1-8C80-4529-9B1B-827329F699A7}.Release|Any CPU.Build.0 = Release|Any CPU
{0DF20C89-C55C-401F-A607-A41A6EC6273E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DF20C89-C55C-401F-A607-A41A6EC6273E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DF20C89-C55C-401F-A607-A41A6EC6273E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0DF20C89-C55C-401F-A607-A41A6EC6273E}.Release|Any CPU.Build.0 = Release|Any CPU
{26B4678F-A48E-4A81-A304-3179D7C984E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26B4678F-A48E-4A81-A304-3179D7C984E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26B4678F-A48E-4A81-A304-3179D7C984E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26B4678F-A48E-4A81-A304-3179D7C984E8}.Release|Any CPU.Build.0 = Release|Any CPU
{48DD5E4F-1C9F-4642-AF7C-B43E91E83BB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48DD5E4F-1C9F-4642-AF7C-B43E91E83BB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48DD5E4F-1C9F-4642-AF7C-B43E91E83BB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48DD5E4F-1C9F-4642-AF7C-B43E91E83BB2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{3F7158B1-8C80-4529-9B1B-827329F699A7} = {10373EAF-A78D-45C0-8F8E-FFA1F1D4DF33}
{0DF20C89-C55C-401F-A607-A41A6EC6273E} = {10373EAF-A78D-45C0-8F8E-FFA1F1D4DF33}
{26B4678F-A48E-4A81-A304-3179D7C984E8} = {10373EAF-A78D-45C0-8F8E-FFA1F1D4DF33}
{48DD5E4F-1C9F-4642-AF7C-B43E91E83BB2} = {103BE93B-FB65-47AC-8741-90823A23A23E}
EndGlobalSection
EndGlobal