diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1559cfa..26b91df 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,16 +10,24 @@ jobs: test: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup .NET - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: | + 3.1.x + 6.0.x + 7.0.x - name: Restore dependencies run: dotnet restore - name: Build - run: dotnet build --no-restore + run: dotnet build --configuration Release --no-restore - name: Test - run: dotnet test --no-build --verbosity normal + run: dotnet test --configuration Release --no-build --verbosity normal --logger:"trx;" + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() + with: + files: | + **/TestResults/*.trx diff --git a/Float.HttpServer.Tests/Float.HttpServer.Tests.csproj b/Float.HttpServer.Tests/Float.HttpServer.Tests.csproj index 95c8619..ec04b5b 100644 --- a/Float.HttpServer.Tests/Float.HttpServer.Tests.csproj +++ b/Float.HttpServer.Tests/Float.HttpServer.Tests.csproj @@ -1,22 +1,31 @@ - net6.0 + netcoreapp3.1;net6.0;net7.0 false - - - - - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + + runtime; build; native; contentfiles; analyzers; buildtransitive all + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + diff --git a/Float.HttpServer/Float.HttpServer.csproj b/Float.HttpServer/Float.HttpServer.csproj index beda40b..1b1a8cc 100644 --- a/Float.HttpServer/Float.HttpServer.csproj +++ b/Float.HttpServer/Float.HttpServer.csproj @@ -1,6 +1,6 @@ - netstandard2.0 + netstandard2;netstandard2.1;net6.0;net7.0 Float.HttpServer Float ..\ @@ -27,6 +27,12 @@ MIT readme.md + + 11.0 + + + 11.0 + runtime; build; native; contentfiles; analyzers; buildtransitive @@ -34,6 +40,6 @@ - + diff --git a/Float.HttpServer/LocalHttpServer.cs b/Float.HttpServer/LocalHttpServer.cs index 7c9945e..dc926fe 100644 --- a/Float.HttpServer/LocalHttpServer.cs +++ b/Float.HttpServer/LocalHttpServer.cs @@ -227,7 +227,10 @@ protected virtual void Dispose(bool disposing) { Stop(); listener.Close(); + cancellationTokenSource.Dispose(); serverThread = null; + startEvent.Dispose(); + stopEvent.Dispose(); } disposed = true; diff --git a/global.json b/global.json deleted file mode 100644 index 7f5066a..0000000 --- a/global.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "sdk": { - "version": "6" - } -}