Skip to content

Commit 453fcb1

Browse files
authored
.NET 10 support, switch to Sqlite testing
Net10 & sqlite
2 parents fd908f6 + a46e826 commit 453fcb1

17 files changed

+216
-86
lines changed

.github/workflows/dotnet.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ jobs:
1616
- name: Setup .NET
1717
uses: actions/setup-dotnet@v4
1818
with:
19-
dotnet-version: 9.0.x
20-
- name: Setup .NET 8.0
21-
uses: actions/setup-dotnet@v4
22-
with:
23-
dotnet-version: 8.0.x
19+
dotnet-version: 10.0.x
2420
- name: Restore dependencies
2521
run: dotnet restore
2622
- name: Check code formatting
@@ -33,7 +29,7 @@ jobs:
3329
run: |
3430
cdir=`pwd`
3531
cd LNUnit.Tests
36-
dotnet test -f net8.0 --filter FullyQualifiedName~LNUnit.Test --no-build --verbosity normal -l "console;verbosity=detailed" --collect:"XPlat Code Coverage" --logger "trx;LogFileName=test-results.trx" --results-directory $cdir/coverage
32+
dotnet test --filter FullyQualifiedName~LNUnit.Test --no-build --verbosity normal -l "console;verbosity=detailed" --collect:"XPlat Code Coverage" --logger "trx;LogFileName=test-results.trx" --results-directory $cdir/coverage
3733
- name: Test Report
3834
uses: dorny/test-reporter@v1
3935
if: success() || failure() # run this step even if previous step failed

.github/workflows/nuget.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ jobs:
1414
- name: Setup .NET
1515
uses: actions/setup-dotnet@v4
1616
with:
17-
dotnet-version: 9.0.x
18-
- name: Setup .NET 8.0
19-
uses: actions/setup-dotnet@v4
20-
with:
21-
dotnet-version: 8.0.x
17+
dotnet-version: 10.0.x
2218
- name: Restore dependencies
2319
run: dotnet restore
2420
- name: Build

.github/workflows/pr.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,12 @@ jobs:
1313

1414
runs-on: ubuntu-latest
1515

16-
steps:
16+
steps:
1717
- uses: actions/checkout@v4
1818
- name: Setup .NET
1919
uses: actions/setup-dotnet@v4
2020
with:
21-
dotnet-version: 9.0.x
22-
- name: Setup .NET 8.0
23-
uses: actions/setup-dotnet@v4
24-
with:
25-
dotnet-version: 8.0.x
21+
dotnet-version: 10.0.x
2622
- name: Restore dependencies
2723
run: dotnet restore
2824
- name: Check code formatting
@@ -32,7 +28,7 @@ jobs:
3228
- name: Build
3329
run: dotnet build --no-restore
3430
- name: Test
35-
run: dotnet test -f net8.0 --no-build --verbosity normal -l "console;verbosity=detailed" --collect:"XPlat Code Coverage" --logger "trx;LogFileName=test-results.trx" --results-directory ./coverage
31+
run: dotnet test --no-build --verbosity normal -l "console;verbosity=detailed" --collect:"XPlat Code Coverage" --logger "trx;LogFileName=test-results.trx" --results-directory ./coverage
3632
- name: Code Coverage Report
3733
uses: irongut/CodeCoverageSummary@v1.3.0
3834
with:

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 nbd
3+
Copyright (c) 2024-2025 nbd
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

LNBolt.Tests/LNBolt.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
1616
<PackageReference Include="NLightning.Bolt11" Version="4.0.0" />
1717
<PackageReference Include="NUnit" Version="3.14.0" />
18-
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
18+
<PackageReference Include="NUnit3TestAdapter" Version="5.1.0" />
1919
<PackageReference Include="org.ldk" Version="0.1.5" />
2020
<PackageReference Include="coverlet.collector" Version="6.0.4">
2121
<PrivateAssets>all</PrivateAssets>

LNBolt/LNBolt.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
77
<PackageProjectUrl>https://github.com/rsafier/LNBolt</PackageProjectUrl>
88
<PackageId>LNBolt</PackageId>
9-
<Version>1.7.8</Version>
9+
<Version>1.9.0</Version>
1010
<Authors>Richard Safier</Authors>
1111
<PackageDescription>LNBolt - C# BOLT protocol helpers</PackageDescription>
1212
<RepositoryUrl>https://github.com/rsafier/LNBolt</RepositoryUrl>
@@ -17,7 +17,7 @@
1717
<PackageReference Include="EndianBinaryIO" Version="1.1.2"/>
1818
<PackageReference Include="Google.Protobuf" Version="3.32.1" />
1919
<PackageReference Include="Grpc.Net.Client" Version="2.71.0" />
20-
<PackageReference Include="NBitcoin" Version="7.0.50" />
20+
<PackageReference Include="NBitcoin" Version="9.0.1" />
2121
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0"/>
2222
<PackageReference Include="ServiceStack.Text" Version="8.8.0" />
2323
<None Include="README.md" Pack="true" PackagePath="\"/>

LNUnit.LND/LNUnit.LND.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
<Nullable>enable</Nullable>
66
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
77
<PackageId>LNUnit.LND</PackageId>
8-
<Version>1.8.7</Version>
8+
<Version>2.0.0</Version>
99
<PackageDescription>LNUnit LND Typed Clients</PackageDescription>
10-
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
11-
<LangVersion>12.0</LangVersion>
10+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
11+
<LangVersion>13.0</LangVersion>
1212
</PropertyGroup>
1313

1414
<!-- <ItemGroup>-->
@@ -34,7 +34,7 @@
3434

3535
<PackageReference Include="Microsoft.NETCore.Targets" Version="5.0.0"/>
3636

37-
<PackageReference Include="NBitcoin" Version="7.0.50" />
37+
<PackageReference Include="NBitcoin" Version="9.0.1" />
3838

3939
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0"/>
4040

LNUnit.Tests/AbcLightningFixtureBoltDb.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
namespace LNUnit.Tests;
1515

1616
[Ignore("only local")]
17-
[TestFixture("boltdb", "custom_lnd", "latest", "/home/lnd/.lnd", false)]
18-
// [TestFixture("boltdb", "lightninglabs/lnd", "v0.17.5-beta", "/root/.lnd", false)]
17+
//[TestFixture("boltdb", "custom_lnd", "latest", "/home/lnd/.lnd", false)]
18+
[TestFixture("boltdb", "lightninglabs/lnd", "v0.19.3-beta", "/root/.lnd", true)]
1919
public class AbcLightningAbstractTestsBoltDb : LNUnit.Tests.Abstract.AbcLightningAbstractTests
2020
{
2121
public AbcLightningAbstractTestsBoltDb(string dbType = "boltdb",

LNUnit.Tests/AbcLightningFixturePostgres.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace LNUnit.Tests.Fixture;
44

5-
//Ignore("only local")]
5+
[Ignore("only local")]
66
//[TestFixture("postgres", "lightninglabs/lnd", "v0.18.3-beta", "/root/.lnd", true)]
77
[TestFixture("postgres", "custom_lnd", "latest", "/home/lnd/.lnd", false)]
88
public class AbcLightningAbstractTestsPostgres : LNUnit.Tests.Abstract.AbcLightningAbstractTests
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
3+
using System.Security.Cryptography;
4+
using Google.Protobuf;
5+
// using LNBolt;
6+
using Lnrpc;
7+
using LNUnit.LND;
8+
using NBitcoin;
9+
using Routerrpc;
10+
using ServiceStack;
11+
using ServiceStack.Text;
12+
using Feature = ServiceStack.Feature;
13+
14+
namespace LNUnit.Tests;
15+
16+
//[Ignore("only local")]
17+
//[TestFixture("boltdb", "custom_lnd", "latest", "/home/lnd/.lnd", false)]
18+
[TestFixture("sqlite", "lightninglabs/lnd", "v0.19.3-beta", "/root/.lnd", true)]
19+
public class AbcLightningAbstractTestsSqlite : LNUnit.Tests.Abstract.AbcLightningAbstractTests
20+
{
21+
public AbcLightningAbstractTestsSqlite(string dbType = "sqlite",
22+
string lndImage = "custom_lnd",
23+
string tag = "latest",
24+
string lndRoot = "/root/.lnd",
25+
bool pullImage = false
26+
) : base(dbType, lndImage, tag, lndRoot, pullImage)
27+
{
28+
29+
}
30+
31+
32+
33+
}

0 commit comments

Comments
 (0)