Skip to content

Commit 191cbd0

Browse files
authored
Modernize NuGet packages to fit Akka.NET 1.5.18 (#228)
* Modernize packages to fit Akka.NET 1.5.18 * Update build system
1 parent e13ce3c commit 191cbd0

File tree

8 files changed

+15
-41
lines changed

8 files changed

+15
-41
lines changed

build-system/azure-pipeline.template.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,14 @@ jobs:
1414
vmImage: ${{ parameters.vmImage }}
1515
steps:
1616
- task: UseDotNet@2
17-
displayName: 'Use .NET 7 SDK 7.0.x'
17+
displayName: 'Use .NET 8 SDK 8.0.x'
1818
inputs:
19-
version: 7.0.x
19+
version: 8.0.x
2020
- task: UseDotNet@2
2121
displayName: 'Use .NET Core Runtime 6.0.x'
2222
inputs:
2323
packageType: runtime
2424
version: 6.0.x
25-
- task: UseDotNet@2
26-
displayName: 'Use .NET Core Runtime 3.1.x'
27-
inputs:
28-
packageType: runtime
29-
version: 3.1.x
3025
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
3126
clean: false # whether to fetch clean each time
3227
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules

build.fsx

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ open Fake.DocFxHelper
1313
let configuration = "Release"
1414

1515
// Configuration values for tests
16-
let testNetCoreVersion = "netcoreapp3.1"
1716
let testNetVersion = "net6.0"
1817

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

108-
let runSingleProject project =
109-
let arguments =
110-
match (hasTeamCity) with
111-
| true -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none -teamcity" testNetCoreVersion outputTests)
112-
| false -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none" testNetCoreVersion outputTests)
113-
114-
let result = ExecProcess(fun info ->
115-
info.FileName <- "dotnet"
116-
info.WorkingDirectory <- (Directory.GetParent project).FullName
117-
info.Arguments <- arguments) (TimeSpan.FromMinutes 30.0)
118-
119-
ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result
120-
121-
CreateDir outputTests
122-
projects |> Seq.iter (runSingleProject)
123-
)
124-
125-
Target "RunTestsNet" (fun _ ->
126-
let projects = match (isWindows) with
127-
| true -> !! "./src/**/*.Tests.*sproj"
128-
| _ -> !! "./src/**/*.Tests.*sproj" // if you need to filter specs for Linux vs. Windows, do it here
129-
130107
let runSingleProject project =
131108
let arguments =
132109
match (hasTeamCity) with
@@ -320,7 +297,6 @@ Target "Nuget" DoNothing
320297

321298
// tests dependencies
322299
"Build" ==> "RunTests"
323-
"Build" ==> "RunTestsNet"
324300

325301
// nuget dependencies
326302
"Clean" ==> "Build" ==> "CreateNuget"
@@ -332,7 +308,6 @@ Target "Nuget" DoNothing
332308
// all
333309
"BuildRelease" ==> "All"
334310
"RunTests" ==> "All"
335-
"RunTestsNet" ==> "All"
336311
"NBench" ==> "All"
337312
"Nuget" ==> "All"
338313

src/Akka.MultiNode.SampleMultiNodeTests/Akka.MultiNode.SampleMultiNodeTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>$(NetCoreTestVersion);$(NetTestVersion)</TargetFrameworks>
3+
<TargetFramework>$(NetTestVersion)</TargetFramework>
44
<IsPackable>false</IsPackable>
55
</PropertyGroup>
66

src/Akka.MultiNode.TestAdapter.Tests/Akka.MultiNode.TestAdapter.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>$(NetCoreTestVersion);$(NetTestVersion)</TargetFrameworks>
3+
<TargetFramework>$(NetTestVersion)</TargetFramework>
44
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>

src/Akka.MultiNode.TestAdapter.Tests/TestSink.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
using Xunit;
1313
using Xunit.Abstractions;
1414
using Xunit.Sdk;
15+
using LongLivedMarshalByRefObject = Xunit.Sdk.LongLivedMarshalByRefObject;
1516
using TestCaseStarting = Xunit.Sdk.TestCaseStarting;
1617

1718
namespace Akka.MultiNode.TestAdapter.Tests
1819
{
19-
internal class TestSink : IMessageSink, IDisposable
20+
internal class TestSink : LongLivedMarshalByRefObject, IMessageSink, IDisposable
2021
{
2122
public ManualResetEvent Finished { get; }= new ManualResetEvent(false);
2223

src/Akka.MultiNode.TestAdapter/Internal/Discovery.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
using System.Threading;
1212
using Xunit.Abstractions;
1313
using Xunit.Sdk;
14+
using LongLivedMarshalByRefObject = Xunit.LongLivedMarshalByRefObject;
1415

1516
namespace Akka.MultiNode.TestAdapter.Internal
1617
{
17-
internal class Discovery : IMessageSink, IDisposable
18+
internal class Discovery : LongLivedMarshalByRefObject, IMessageSink, IDisposable
1819
{
1920
// There can be multiple fact attributes in a single class, but our convention
2021
// limits them to 1 fact attribute per test class

src/Akka.MultiNode.TestAdapter/NodeRunner/ExecutorSink.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
using Xunit;
1313
using Xunit.Abstractions;
1414
using IMessageSink = Xunit.Abstractions.IMessageSink;
15+
using LongLivedMarshalByRefObject = Xunit.Sdk.LongLivedMarshalByRefObject;
1516

1617
namespace Akka.MultiNode.TestAdapter.NodeRunner
1718
{
18-
internal class ExecutorSink : IMessageSink, IDisposable
19+
internal class ExecutorSink : LongLivedMarshalByRefObject, IMessageSink, IDisposable
1920
{
2021
public bool Passed { get; private set; }
2122
public ManualResetEvent Finished { get; private set; }

src/Directory.Packages.props

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
<Project>
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
<XUnitVersion>2.5.3</XUnitVersion>
45
</PropertyGroup>
56
<!-- App dependencies -->
67
<ItemGroup>
7-
<PackageVersion Include="Akka.Cluster.TestKit" Version="1.5.13" />
8+
<PackageVersion Include="Akka.Cluster.TestKit" Version="1.5.18" />
89
<PackageVersion Include="TeamCity.ServiceMessages" Version="4.1.1" />
910
<PackageVersion Include="System.CodeDom" Version="8.0.0" />
1011
<PackageVersion Include="System.Runtime.Loader" Version="4.3.0" />
11-
<PackageVersion Include="xunit.runner.utility" Version="2.6.2" />
12+
<PackageVersion Include="xunit.runner.utility" Version="$(XUnitVersion)" />
1213
</ItemGroup>
1314
<!-- Test dependencies -->
1415
<ItemGroup>
15-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
16+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
1617
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
17-
<PackageVersion Include="xunit" Version="2.5.0" />
18+
<PackageVersion Include="xunit" Version="$(XUnitVersion)" />
1819
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
1920
</ItemGroup>
2021
<!-- SourceLink support for all Akka.NET projects -->

0 commit comments

Comments
 (0)