Skip to content

Commit 769599e

Browse files
author
bbeversdorf
authored
SL-6373 - MAUI Support (#17)
1 parent 82c611a commit 769599e

5 files changed

Lines changed: 42 additions & 21 deletions

File tree

.github/workflows/test.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,24 @@ jobs:
1010
test:
1111

1212
runs-on: ubuntu-latest
13-
1413
steps:
15-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1615
- name: Setup .NET
17-
uses: actions/setup-dotnet@v1
16+
uses: actions/setup-dotnet@v3
1817
with:
19-
dotnet-version: 6.0.x
18+
dotnet-version: |
19+
3.1.x
20+
6.0.x
21+
7.0.x
2022
- name: Restore dependencies
2123
run: dotnet restore
2224
- name: Build
23-
run: dotnet build --no-restore
25+
run: dotnet build --configuration Release --no-restore
2426
- name: Test
25-
run: dotnet test --no-build --verbosity normal
27+
run: dotnet test --configuration Release --no-build --verbosity normal --logger:"trx;"
28+
- name: Publish Test Results
29+
uses: EnricoMi/publish-unit-test-result-action@v2
30+
if: always()
31+
with:
32+
files: |
33+
**/TestResults/*.trx

Float.HttpServer.Tests/Float.HttpServer.Tests.csproj

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0</TargetFrameworks>
44
<IsPackable>false</IsPackable>
55
</PropertyGroup>
6-
<ItemGroup>
7-
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
8-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
9-
<PackageReference Include="NunitXml.TestLogger" Version="3.0.127" />
10-
<PackageReference Include="xunit" Version="2.4.2" />
11-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
6+
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net7.0'">
7+
<PackageReference Include="coverlet.collector" Version="6.0.0">
128
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
139
<PrivateAssets>all</PrivateAssets>
1410
</PackageReference>
15-
<PackageReference Include="coverlet.msbuild" Version="3.1.2">
11+
<PackageReference Include="xunit" Version="2.5.0" />
12+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
1613
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1714
<PrivateAssets>all</PrivateAssets>
1815
</PackageReference>
1916
</ItemGroup>
17+
<ItemGroup Condition="$(TargetFramework.StartsWith('netcoreapp'))">
18+
<PackageReference Include="xunit" Version="2.4.2" />
19+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
20+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
21+
<PrivateAssets>all</PrivateAssets>
22+
</PackageReference>
23+
<PackageReference Include="coverlet.msbuild" Version="3.2.0" />
24+
</ItemGroup>
25+
<ItemGroup>
26+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
27+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
28+
</ItemGroup>
2029
<ItemGroup>
2130
<ProjectReference Include="..\Float.HttpServer\Float.HttpServer.csproj" />
2231
</ItemGroup>

Float.HttpServer/Float.HttpServer.csproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netstandard2.0</TargetFramework>
3+
<TargetFrameworks>netstandard2;netstandard2.1;net6.0;net7.0</TargetFrameworks>
44
<AssemblyName>Float.HttpServer</AssemblyName>
55
<AssemblyAuthor>Float</AssemblyAuthor>
66
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
@@ -27,13 +27,19 @@
2727
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2828
<PackageReadmeFile>readme.md</PackageReadmeFile>
2929
</PropertyGroup>
30+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
31+
<LangVersion>11.0</LangVersion>
32+
</PropertyGroup>
33+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
34+
<LangVersion>11.0</LangVersion>
35+
</PropertyGroup>
3036
<ItemGroup>
3137
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
3238
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3339
<PrivateAssets>all</PrivateAssets>
3440
</PackageReference>
3541
</ItemGroup>
3642
<ItemGroup>
37-
<None Include="../readme.md" Pack="true" PackagePath="\"/>
43+
<None Include="../readme.md" Pack="true" PackagePath="\" />
3844
</ItemGroup>
3945
</Project>

Float.HttpServer/LocalHttpServer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,10 @@ protected virtual void Dispose(bool disposing)
227227
{
228228
Stop();
229229
listener.Close();
230+
cancellationTokenSource.Dispose();
230231
serverThread = null;
232+
startEvent.Dispose();
233+
stopEvent.Dispose();
231234
}
232235

233236
disposed = true;

global.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)