Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
with:
path: ~/.nuget/packages
key: nuget-${{ hashFiles('**/*.csproj') }}
- name: Build
run: dotnet build -warnaserror
- name: Build and test
run: dotnet test -warnaserror
- name: Build nuget
if: github.event_name == 'workflow_dispatch'
run: dotnet pack PolyMod.csproj -o nuget
Expand Down
6 changes: 5 additions & 1 deletion PolyMod.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PolyMod", "PolyMod.csproj", "{58B09361-FD7A-48F1-82E1-E2359ADA512F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PolyMod", "src\PolyMod.csproj", "{58B09361-FD7A-48F1-82E1-E2359ADA512F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "tests\Tests.csproj", "{85432E7B-2023-477C-861E-0141E8974DDC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -12,6 +14,8 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{58B09361-FD7A-48F1-82E1-E2359ADA512F}.IL2CPP|Any CPU.ActiveCfg = IL2CPP|Any CPU
{58B09361-FD7A-48F1-82E1-E2359ADA512F}.IL2CPP|Any CPU.Build.0 = IL2CPP|Any CPU
{85432E7B-2023-477C-861E-0141E8974DDC}.IL2CPP|Any CPU.ActiveCfg = IL2CPP|Any CPU
{85432E7B-2023-477C-861E-0141E8974DDC}.IL2CPP|Any CPU.Build.0 = IL2CPP|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
9 changes: 9 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="BepInEx" value="https://nuget.bepinex.dev/v3/index.json" />
<add key="Samboy" value="https://nuget.samboy.dev/v3/index.json" />
<add key="PolyMod" value="https://polymod.dev/nuget/v3/index.json" />
</packageSources>
</configuration>
6 changes: 0 additions & 6 deletions PolyMod.csproj → src/PolyMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RestoreAdditionalProjectSources>
https://api.nuget.org/v3/index.json;
https://nuget.bepinex.dev/v3/index.json;
https://nuget.samboy.dev/v3/index.json;
https://polymod.dev/nuget/v3/index.json;
</RestoreAdditionalProjectSources>
<Configurations>IL2CPP</Configurations>
<Version>1.2.0-pre</Version>
<PolytopiaVersion>2.13.0.14218</PolytopiaVersion>
Expand Down
35 changes: 35 additions & 0 deletions tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>tests</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<!--
To enable the Microsoft Testing Platform 'dotnet test' experience, add property:
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>

To enable the Microsoft Testing Platform native command line experience, add property:
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>

For more information on Microsoft Testing Platform support in xUnit.net, please visit:
https://xunit.net/docs/getting-started/v3/microsoft-testing-platform
-->
</PropertyGroup>

<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="../src/PolyMod.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="xunit.v3" Version="3.0.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />
</ItemGroup>

</Project>
10 changes: 10 additions & 0 deletions tests/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Tests;

public class UnitTest1
{
[Fact]
public void Test1()
{
Assert.True(true);
}
}
3 changes: 3 additions & 0 deletions tests/xunit.runner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json"
}