diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index db51c1a..8a4b34d 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -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 diff --git a/PolyMod.sln b/PolyMod.sln index 2e325f4..668e23f 100644 --- a/PolyMod.sln +++ b/PolyMod.sln @@ -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 @@ -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 diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..6ebe1ff --- /dev/null +++ b/nuget.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/PolyMod.csproj b/src/PolyMod.csproj similarity index 85% rename from PolyMod.csproj rename to src/PolyMod.csproj index 072a080..fe88ce2 100644 --- a/PolyMod.csproj +++ b/src/PolyMod.csproj @@ -3,12 +3,6 @@ net6.0 enable enable - - 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; - IL2CPP 1.2.0-pre 2.13.0.14218 diff --git a/tests/Tests.csproj b/tests/Tests.csproj new file mode 100644 index 0000000..9aa362f --- /dev/null +++ b/tests/Tests.csproj @@ -0,0 +1,35 @@ + + + enable + enable + tests + net8.0 + false + + + + + + + + + + + + + + + + + + + diff --git a/tests/UnitTest1.cs b/tests/UnitTest1.cs new file mode 100644 index 0000000..a54dd9a --- /dev/null +++ b/tests/UnitTest1.cs @@ -0,0 +1,10 @@ +namespace Tests; + +public class UnitTest1 +{ + [Fact] + public void Test1() + { + Assert.True(true); + } +} diff --git a/tests/xunit.runner.json b/tests/xunit.runner.json new file mode 100644 index 0000000..249d815 --- /dev/null +++ b/tests/xunit.runner.json @@ -0,0 +1,3 @@ +{ + "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json" +}