diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a0c50084..e28d80c3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: os: [windows-latest, macOS-latest, ubuntu-latest] - dotnet: [6.0.408] + dotnet: [8.0.425] runs-on: ${{ matrix.os }} steps: @@ -24,11 +24,14 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: ${{ matrix.dotnet }} + # FAKE 6 needs the .NET 6 SDK alongside the .NET 8 project SDK. + dotnet-version: | + 6.0.428 + ${{ matrix.dotnet }} - name: Install local tools run: dotnet tool restore - name: Paket Restore run: dotnet paket restore - name: Build and Test - run: dotnet fake run build.fsx \ No newline at end of file + run: dotnet fake run build.fsx diff --git a/global.json b/global.json index eb6b3192..597a02d6 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.408", + "version": "8.0.425", "rollForward": "minor" } -} \ No newline at end of file +} diff --git a/paket.dependencies b/paket.dependencies index bf1faf98..a7647eb0 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,12 +1,12 @@ source https://api.nuget.org/v3/index.json -framework: net6.0, netstandard2.0 +framework: net8.0, netstandard2.0 nuget FSharp.Core ~> 5.0.0 nuget Microsoft.NET.Test.Sdk // NUnit -nuget NUnit ~> 4.0.0 +nuget NUnit ~> 5.0.0 nuget NUnit3TestAdapter nuget System.Collections.Immutable nuget System.Collections.NonGeneric diff --git a/paket.lock b/paket.lock index 1d3059cf..ad07dae4 100644 --- a/paket.lock +++ b/paket.lock @@ -1,14 +1,14 @@ -RESTRICTION: || (== net6.0) (== netstandard2.0) +RESTRICTION: || (== net8.0) (== netstandard2.0) NUGET remote: https://api.nuget.org/v3/index.json FSharp.Core (5.0.2) Microsoft.ApplicationInsights (2.22) System.Diagnostics.DiagnosticSource (>= 5.0) - Microsoft.Bcl.AsyncInterfaces (9.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - Microsoft.CodeCoverage (17.12) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net462)) (&& (== netstandard2.0) (>= netcoreapp3.1)) + Microsoft.Bcl.AsyncInterfaces (9.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + Microsoft.CodeCoverage (17.12) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net462)) (&& (== netstandard2.0) (>= netcoreapp3.1)) Microsoft.NET.Test.Sdk (17.12) - Microsoft.CodeCoverage (>= 17.12) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net462)) (&& (== netstandard2.0) (>= netcoreapp3.1)) - Microsoft.TestPlatform.TestHost (>= 17.12) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) + Microsoft.CodeCoverage (>= 17.12) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net462)) (&& (== netstandard2.0) (>= netcoreapp3.1)) + Microsoft.TestPlatform.TestHost (>= 17.12) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) Microsoft.NETCore.Platforms (7.0.4) Microsoft.NETCore.Targets (5.0) Microsoft.Testing.Extensions.Telemetry (1.4.3) @@ -27,21 +27,21 @@ NUGET Microsoft.Testing.Platform (>= 1.4.3) Microsoft.TestPlatform.ObjectModel (17.12) System.Reflection.Metadata (>= 1.6) - Microsoft.TestPlatform.TestHost (17.12) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - Microsoft.TestPlatform.ObjectModel (>= 17.12) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - Newtonsoft.Json (>= 13.0.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) + Microsoft.TestPlatform.TestHost (17.12) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) + Microsoft.TestPlatform.ObjectModel (>= 17.12) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) + Newtonsoft.Json (>= 13.0.1) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) MSTest.TestAdapter (3.6.4) Microsoft.Testing.Extensions.VSTestBridge (>= 1.4.3) Microsoft.Testing.Platform.MSBuild (>= 1.4.3) MSTest.TestFramework (3.6.4) - Newtonsoft.Json (13.0.3) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) + Newtonsoft.Json (13.0.3) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) NHamcrest (4.0) - NUnit (4.0.1) + NUnit (5.0) NUnit3TestAdapter (4.6) - System.Buffers (4.6) - restriction: || (&& (== net6.0) (>= net462)) (&& (== net6.0) (< netcoreapp2.1)) (== netstandard2.0) + System.Buffers (4.6) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0) System.Collections.Immutable (9.0) - System.Memory (>= 4.5.5) - System.Runtime.CompilerServices.Unsafe (>= 6.0) + System.Memory (>= 4.5.5) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0) System.Collections.NonGeneric (4.3) System.Diagnostics.Debug (>= 4.3) System.Globalization (>= 4.3) @@ -54,8 +54,8 @@ NUGET Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) System.Diagnostics.DiagnosticSource (9.0) - System.Memory (>= 4.5.5) - System.Runtime.CompilerServices.Unsafe (>= 6.0) + System.Memory (>= 4.5.5) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0) System.Globalization (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) @@ -66,20 +66,19 @@ NUGET System.Runtime (>= 4.3) System.Text.Encoding (>= 4.3) System.Threading.Tasks (>= 4.3) - System.Memory (4.6) - System.Buffers (>= 4.6) - restriction: || (&& (== net6.0) (>= net462)) (&& (== net6.0) (< netcoreapp2.1)) (== netstandard2.0) - System.Numerics.Vectors (>= 4.6) - restriction: || (&& (== net6.0) (>= net462)) (&& (== net6.0) (< netcoreapp2.1)) (== netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.1) - restriction: || (&& (== net6.0) (>= net462)) (&& (== net6.0) (< netcoreapp2.1)) (== netstandard2.0) - System.Numerics.Vectors (4.6) - restriction: || (&& (== net6.0) (>= net462)) (&& (== net6.0) (< netcoreapp2.1)) (== netstandard2.0) + System.Memory (4.6) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0) + System.Buffers (>= 4.6) - restriction: || (&& (== net8.0) (>= net462)) (&& (== net8.0) (< netcoreapp2.1)) (== netstandard2.0) + System.Numerics.Vectors (>= 4.6) - restriction: || (&& (== net8.0) (>= net462)) (&& (== net8.0) (< netcoreapp2.1)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.1) - restriction: || (&& (== net8.0) (>= net462)) (&& (== net8.0) (< netcoreapp2.1)) (== netstandard2.0) + System.Numerics.Vectors (4.6) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0) System.Reflection (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.IO (>= 4.3) System.Reflection.Primitives (>= 4.3) System.Runtime (>= 4.3) - System.Reflection.Metadata (9.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) + System.Reflection.Metadata (9.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) System.Collections.Immutable (>= 9.0) - System.Memory (>= 4.5.5) System.Reflection.Primitives (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) @@ -93,7 +92,7 @@ NUGET System.Runtime (4.3.1) Microsoft.NETCore.Platforms (>= 1.1.1) Microsoft.NETCore.Targets (>= 1.1.3) - System.Runtime.CompilerServices.Unsafe (6.1) + System.Runtime.CompilerServices.Unsafe (6.1) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0) System.Runtime.Extensions (4.3.1) Microsoft.NETCore.Platforms (>= 1.1.1) Microsoft.NETCore.Targets (>= 1.1.3) @@ -109,25 +108,25 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) - xunit.analyzers (1.18) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.analyzers (1.18) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) xunit.runner.visualstudio (3.0) xunit.v3 (1.0) - xunit.analyzers (>= 1.18) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - xunit.v3.assert (1.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - xunit.v3.core (1.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - xunit.v3.assert (1.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - xunit.v3.common (1.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.analyzers (>= 1.18) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.v3.assert (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.v3.core (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.v3.assert (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.v3.common (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) Microsoft.Bcl.AsyncInterfaces (>= 6.0) - xunit.v3.core (1.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - Microsoft.Testing.Platform.MSBuild (>= 1.4.3) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - xunit.v3.extensibility.core (1.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - xunit.v3.runner.inproc.console (1.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - xunit.v3.extensibility.core (1.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.v3.core (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + Microsoft.Testing.Platform.MSBuild (>= 1.4.3) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.v3.extensibility.core (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.v3.runner.inproc.console (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.v3.extensibility.core (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) xunit.v3.common (1.0) - xunit.v3.runner.common (1.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.v3.runner.common (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) xunit.v3.common (1.0) - xunit.v3.runner.inproc.console (1.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - Microsoft.Testing.Extensions.TrxReport.Abstractions (>= 1.4.3) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - Microsoft.Testing.Platform (>= 1.4.3) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - xunit.v3.extensibility.core (1.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) - xunit.v3.runner.common (1.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.v3.runner.inproc.console (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + Microsoft.Testing.Extensions.TrxReport.Abstractions (>= 1.4.3) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + Microsoft.Testing.Platform (>= 1.4.3) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.v3.extensibility.core (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) + xunit.v3.runner.common (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0)) diff --git a/src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj b/src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj index 0a3f9a38..e71fa575 100644 --- a/src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj +++ b/src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj @@ -1,6 +1,6 @@  - net6.0;netstandard2.0 + net8.0;netstandard2.0 FsUnit.MsTest Library false @@ -25,4 +25,4 @@ - \ No newline at end of file + diff --git a/src/FsUnit.MsTestUnit/paket.template b/src/FsUnit.MsTestUnit/paket.template index c4e9173b..88ec93a5 100644 --- a/src/FsUnit.MsTestUnit/paket.template +++ b/src/FsUnit.MsTestUnit/paket.template @@ -22,7 +22,7 @@ summary description FsUnit is a set of extensions that add special testing syntax to MsTest. files - ../../bin/FsUnit.MsTest/net6.0/FsUnit.* ==> lib/net6.0 + ../../bin/FsUnit.MsTest/net8.0/FsUnit.* ==> lib/net8.0 ../../bin/FsUnit.MsTest/netstandard2.0/FsUnit.* ==> lib/netstandard2.0 ../../src/install.ps1 ==> tools diff --git a/src/FsUnit.NUnit/FsUnit.NUnit.fsproj b/src/FsUnit.NUnit/FsUnit.NUnit.fsproj index bf9486eb..f54e50f0 100644 --- a/src/FsUnit.NUnit/FsUnit.NUnit.fsproj +++ b/src/FsUnit.NUnit/FsUnit.NUnit.fsproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 FsUnit.NUnit Library false @@ -27,4 +27,4 @@ - \ No newline at end of file + diff --git a/src/FsUnit.NUnit/FsUnit.fs b/src/FsUnit.NUnit/FsUnit.fs index e3f65dff..35dcece6 100644 --- a/src/FsUnit.NUnit/FsUnit.fs +++ b/src/FsUnit.NUnit/FsUnit.fs @@ -34,8 +34,8 @@ module TopLevelOperators = let y = match actual with - | :? (unit -> unit) as testFunc -> box(TestDelegate(testFunc)) - | :? (unit -> obj) as testFunc -> box(TestDelegate(testFunc >> ignore)) + | :? (unit -> unit) as testFunc -> box(System.Action(testFunc)) + | :? (unit -> obj) as testFunc -> box(System.Action(testFunc >> ignore)) | _ -> actual if isNull(box expression) then @@ -58,10 +58,10 @@ module TopLevelOperators = let contain expected = ContainsConstraint(expected) - let haveLength expected = + let haveLength(expected: int) = Has.Length.EqualTo(expected) - let haveCount expected = + let haveCount(expected: int) = Has.Count.EqualTo(expected) let be = id @@ -87,7 +87,7 @@ module TopLevelOperators = LessThanOrEqualConstraint(expected) let shouldFail(f: unit -> unit) = - TestDelegate(f) |> should throw typeof + System.Action(f) |> should throw typeof let endWith(expected: string) = EndsWithConstraint expected diff --git a/src/FsUnit.NUnit/FsUnitTyped.fs b/src/FsUnit.NUnit/FsUnitTyped.fs index 7c956ee2..8b225804 100644 --- a/src/FsUnit.NUnit/FsUnitTyped.fs +++ b/src/FsUnit.NUnit/FsUnitTyped.fs @@ -36,7 +36,7 @@ module TopLevelOperators = [] let shouldFail<'exn when 'exn :> exn>(f: unit -> unit) = - Assert.Throws(Is.InstanceOf<'exn>(), TestDelegate(f)) |> ignore + Assert.Throws(Is.InstanceOf<'exn>(), System.Action(f)) |> ignore [] let shouldContainText (expected: string) (actual: string) = diff --git a/src/FsUnit.NUnit/paket.template b/src/FsUnit.NUnit/paket.template index df29407d..f52940d3 100644 --- a/src/FsUnit.NUnit/paket.template +++ b/src/FsUnit.NUnit/paket.template @@ -22,7 +22,7 @@ summary description FsUnit is a set of extensions that add special testing syntax to NUnit. files - ../../bin/FsUnit.NUnit/net6.0/FsUnit.* ==> lib/net6.0 + ../../bin/FsUnit.NUnit/net8.0/FsUnit.* ==> lib/net8.0 ../../src/install.ps1 ==> tools dependencies diff --git a/src/FsUnit.Xunit/FsUnit.Xunit.fsproj b/src/FsUnit.Xunit/FsUnit.Xunit.fsproj index 94424f2f..a97bfc5c 100644 --- a/src/FsUnit.Xunit/FsUnit.Xunit.fsproj +++ b/src/FsUnit.Xunit/FsUnit.Xunit.fsproj @@ -1,6 +1,6 @@  - net6.0;netstandard2.0 + net8.0;netstandard2.0 FsUnit.Xunit Library false diff --git a/src/FsUnit.Xunit/paket.template b/src/FsUnit.Xunit/paket.template index a6a88e76..1cf5a4b9 100644 --- a/src/FsUnit.Xunit/paket.template +++ b/src/FsUnit.Xunit/paket.template @@ -22,7 +22,7 @@ summary description FsUnit is a set of extensions that add special testing syntax to xUnit. files - ../../bin/FsUnit.Xunit/net6.0/FsUnit.* ==> lib/net6.0 + ../../bin/FsUnit.Xunit/net8.0/FsUnit.* ==> lib/net8.0 ../../bin/FsUnit.Xunit/netstandard2.0/FsUnit.* ==> lib/netstandard2.0 ../../src/install.ps1 ==> tools diff --git a/tests/FsUnit.MsTest.Test/FsUnit.MsTest.Test.fsproj b/tests/FsUnit.MsTest.Test/FsUnit.MsTest.Test.fsproj index b97767c5..ad163873 100644 --- a/tests/FsUnit.MsTest.Test/FsUnit.MsTest.Test.fsproj +++ b/tests/FsUnit.MsTest.Test/FsUnit.MsTest.Test.fsproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 true @@ -46,4 +46,4 @@ - \ No newline at end of file + diff --git a/tests/FsUnit.NUnit.Test/FsUnit.NUnit.Test.fsproj b/tests/FsUnit.NUnit.Test/FsUnit.NUnit.Test.fsproj index fc068c80..f25882c4 100644 --- a/tests/FsUnit.NUnit.Test/FsUnit.NUnit.Test.fsproj +++ b/tests/FsUnit.NUnit.Test/FsUnit.NUnit.Test.fsproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 false @@ -52,4 +52,4 @@ - \ No newline at end of file + diff --git a/tests/FsUnit.Xunit.Test/FsUnit.Xunit.Test.fsproj b/tests/FsUnit.Xunit.Test/FsUnit.Xunit.Test.fsproj index 9e431281..0ce5ca7a 100644 --- a/tests/FsUnit.Xunit.Test/FsUnit.Xunit.Test.fsproj +++ b/tests/FsUnit.Xunit.Test/FsUnit.Xunit.Test.fsproj @@ -1,6 +1,6 @@  - net6.0 + net8.0