Skip to content

Commit

Permalink
removed hook manager selection, added net8.0 support to pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
SvetlovA committed Nov 23, 2023
1 parent f00e6db commit 542578e
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 81 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@ on:
workflow_dispatch:
workflow_call:
jobs:
# MonoMod tests
buildAndTestUbuntuMonoMod:
buildAndTestUbuntu:
uses: ./.github/workflows/build_and_test_job.yaml
with:
os: ubuntu-latest
hook_manager_type: MonoMod
buildAndTestWindowsMonoMod:
buildAndTestWindows:
uses: ./.github/workflows/build_and_test_job.yaml
with:
os: windows-latest
hook_manager_type: MonoMod
buildAndTestMacMonoMod:
buildAndTestMac:
uses: ./.github/workflows/build_and_test_job.yaml
with:
os: macos-latest
hook_manager_type: MonoMod
15 changes: 2 additions & 13 deletions .github/workflows/build_and_test_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,14 @@ on:
- windows-latest
- macos-latest
default: windows-latest
hook_manager_type:
type: choice
description: 'Run tests on special hook manager type. Possible hook manager types: Harmony, Native, MonoMod. Default: MonoMod'
required: true
options:
- MonoMod
default: MonoMod
workflow_call:
inputs:
os:
type: string
required: true
default: ubuntu-latest
hook_manager_type:
type: string
required: true
default: MonoMod
jobs:
buildAndTest:
env:
HOOK_MANAGER_TYPE: ${{ inputs.hook_manager_type }}
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -43,6 +30,7 @@ jobs:
5.0.x
6.0.x
7.0.x
8.0.x
- name: Restore dependencies
run: dotnet restore src
- name: Build
Expand All @@ -58,4 +46,5 @@ jobs:
dotnet test --framework net5.0 --no-build --configuration Release --verbosity normal
dotnet test --framework net6.0 --no-build --configuration Release --verbosity normal
dotnet test --framework net7.0 --no-build --configuration Release --verbosity normal
dotnet test --framework net8.0 --no-build --configuration Release --verbosity normal
working-directory: ./src
1 change: 0 additions & 1 deletion .github/workflows/github_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
- uses: ./.github/workflows/build_and_test_job.yaml
with:
os: ubuntu-latest
hook_manager_type: MonoMod
- name: Pack
run: dotnet pack --no-build --configuration Release --output packages src/StaticMock/StaticMock.csproj
- name: Prepare
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/nuget_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
- uses: ./.github/workflows/build_and_test_job.yaml
with:
os: ubuntu-latest
hook_manager_type: MonoMod
- name: Pack
run: dotnet pack --no-build --configuration Release --output packages src/StaticMock/StaticMock.csproj
- name: Push
Expand Down
12 changes: 2 additions & 10 deletions src/StaticMock.Tests/AssemblySetup.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Microsoft.Extensions.Configuration;
using NUnit.Framework;
using StaticMock.Tests.Settings;
using NUnit.Framework;

namespace StaticMock.Tests;

Expand All @@ -10,12 +8,6 @@ public class AssemblySetup
[OneTimeSetUp]
public void Setup()
{
var configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.AddJsonFile($"appsettings.{Environment.GetEnvironmentVariable("HOOK_MANAGER_TYPE")}.json", optional: true)
.Build();

var appSettings = AppSettingsReader.ReadSettings(configuration);
Console.WriteLine($"Hook manager type: {appSettings.HookManagerType}");
Console.WriteLine($".NET Version: {Environment.Version}");
}
}
18 changes: 0 additions & 18 deletions src/StaticMock.Tests/Settings/AppSettingsReader.cs

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions src/StaticMock.Tests/Settings/Entities/AppSettings.cs

This file was deleted.

9 changes: 0 additions & 9 deletions src/StaticMock.Tests/StaticMock.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,4 @@
<ProjectReference Include="..\StaticMock\StaticMock.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="appsettings.MonoMod.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
3 changes: 0 additions & 3 deletions src/StaticMock.Tests/appsettings.MonoMod.json

This file was deleted.

3 changes: 0 additions & 3 deletions src/StaticMock.Tests/appsettings.json

This file was deleted.

0 comments on commit 542578e

Please sign in to comment.