Skip to content

Commit

Permalink
Modernize NuGet packages to fit Akka.NET 1.5.18 (#228)
Browse files Browse the repository at this point in the history
* Modernize packages to fit Akka.NET 1.5.18

* Update build system
  • Loading branch information
Arkatufus committed Apr 11, 2024
1 parent e13ce3c commit 191cbd0
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 41 deletions.
9 changes: 2 additions & 7 deletions build-system/azure-pipeline.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,14 @@ jobs:
vmImage: ${{ parameters.vmImage }}
steps:
- task: UseDotNet@2
displayName: 'Use .NET 7 SDK 7.0.x'
displayName: 'Use .NET 8 SDK 8.0.x'
inputs:
version: 7.0.x
version: 8.0.x
- task: UseDotNet@2
displayName: 'Use .NET Core Runtime 6.0.x'
inputs:
packageType: runtime
version: 6.0.x
- task: UseDotNet@2
displayName: 'Use .NET Core Runtime 3.1.x'
inputs:
packageType: runtime
version: 3.1.x
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: false # whether to fetch clean each time
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
Expand Down
25 changes: 0 additions & 25 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ open Fake.DocFxHelper
let configuration = "Release"

// Configuration values for tests
let testNetCoreVersion = "netcoreapp3.1"
let testNetVersion = "net6.0"

// Metadata used when signing packages and DLLs
Expand Down Expand Up @@ -105,28 +104,6 @@ Target "RunTests" (fun _ ->
| true -> !! "./src/**/*.Tests.*sproj"
| _ -> !! "./src/**/*.Tests.*sproj" // if you need to filter specs for Linux vs. Windows, do it here

let runSingleProject project =
let arguments =
match (hasTeamCity) with
| true -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none -teamcity" testNetCoreVersion outputTests)
| false -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none" testNetCoreVersion outputTests)

let result = ExecProcess(fun info ->
info.FileName <- "dotnet"
info.WorkingDirectory <- (Directory.GetParent project).FullName
info.Arguments <- arguments) (TimeSpan.FromMinutes 30.0)

ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result

CreateDir outputTests
projects |> Seq.iter (runSingleProject)
)

Target "RunTestsNet" (fun _ ->
let projects = match (isWindows) with
| true -> !! "./src/**/*.Tests.*sproj"
| _ -> !! "./src/**/*.Tests.*sproj" // if you need to filter specs for Linux vs. Windows, do it here

let runSingleProject project =
let arguments =
match (hasTeamCity) with
Expand Down Expand Up @@ -320,7 +297,6 @@ Target "Nuget" DoNothing

// tests dependencies
"Build" ==> "RunTests"
"Build" ==> "RunTestsNet"

// nuget dependencies
"Clean" ==> "Build" ==> "CreateNuget"
Expand All @@ -332,7 +308,6 @@ Target "Nuget" DoNothing
// all
"BuildRelease" ==> "All"
"RunTests" ==> "All"
"RunTestsNet" ==> "All"
"NBench" ==> "All"
"Nuget" ==> "All"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreTestVersion);$(NetTestVersion)</TargetFrameworks>
<TargetFramework>$(NetTestVersion)</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreTestVersion);$(NetTestVersion)</TargetFrameworks>
<TargetFramework>$(NetTestVersion)</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/Akka.MultiNode.TestAdapter.Tests/TestSink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
using Xunit;
using Xunit.Abstractions;
using Xunit.Sdk;
using LongLivedMarshalByRefObject = Xunit.Sdk.LongLivedMarshalByRefObject;
using TestCaseStarting = Xunit.Sdk.TestCaseStarting;

namespace Akka.MultiNode.TestAdapter.Tests
{
internal class TestSink : IMessageSink, IDisposable
internal class TestSink : LongLivedMarshalByRefObject, IMessageSink, IDisposable
{
public ManualResetEvent Finished { get; }= new ManualResetEvent(false);

Expand Down
3 changes: 2 additions & 1 deletion src/Akka.MultiNode.TestAdapter/Internal/Discovery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
using System.Threading;
using Xunit.Abstractions;
using Xunit.Sdk;
using LongLivedMarshalByRefObject = Xunit.LongLivedMarshalByRefObject;

namespace Akka.MultiNode.TestAdapter.Internal
{
internal class Discovery : IMessageSink, IDisposable
internal class Discovery : LongLivedMarshalByRefObject, IMessageSink, IDisposable
{
// There can be multiple fact attributes in a single class, but our convention
// limits them to 1 fact attribute per test class
Expand Down
3 changes: 2 additions & 1 deletion src/Akka.MultiNode.TestAdapter/NodeRunner/ExecutorSink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
using Xunit;
using Xunit.Abstractions;
using IMessageSink = Xunit.Abstractions.IMessageSink;
using LongLivedMarshalByRefObject = Xunit.Sdk.LongLivedMarshalByRefObject;

namespace Akka.MultiNode.TestAdapter.NodeRunner
{
internal class ExecutorSink : IMessageSink, IDisposable
internal class ExecutorSink : LongLivedMarshalByRefObject, IMessageSink, IDisposable
{
public bool Passed { get; private set; }
public ManualResetEvent Finished { get; private set; }
Expand Down
9 changes: 5 additions & 4 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<XUnitVersion>2.5.3</XUnitVersion>
</PropertyGroup>
<!-- App dependencies -->
<ItemGroup>
<PackageVersion Include="Akka.Cluster.TestKit" Version="1.5.13" />
<PackageVersion Include="Akka.Cluster.TestKit" Version="1.5.18" />
<PackageVersion Include="TeamCity.ServiceMessages" Version="4.1.1" />
<PackageVersion Include="System.CodeDom" Version="8.0.0" />
<PackageVersion Include="System.Runtime.Loader" Version="4.3.0" />
<PackageVersion Include="xunit.runner.utility" Version="2.6.2" />
<PackageVersion Include="xunit.runner.utility" Version="$(XUnitVersion)" />
</ItemGroup>
<!-- Test dependencies -->
<ItemGroup>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="xunit" Version="2.5.0" />
<PackageVersion Include="xunit" Version="$(XUnitVersion)" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
</ItemGroup>
<!-- SourceLink support for all Akka.NET projects -->
Expand Down

0 comments on commit 191cbd0

Please sign in to comment.