Skip to content

Commit

Permalink
run tests in netcoreapp3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Enrico Sada committed Nov 27, 2019
1 parent 0f10a28 commit 2143d45
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 26 deletions.
44 changes: 21 additions & 23 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,25 +242,6 @@ Target "Publish" (fun _ ->
)
"Clean" ==> "Build" ?=> "Publish"

Target "RunIntegrationTestsNetCore" (fun _ ->
CreateDir "tests_result/netcore/Paket.IntegrationTests"

// improves the speed of the test-suite by disabling the runtime resolution.
System.Environment.SetEnvironmentVariable("PAKET_DISABLE_RUNTIME_RESOLUTION", "true")
DotNetCli.Test (fun c ->
{ c with
Project = "integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj"
Framework = "netcoreapp2.1"
AdditionalArgs =
[ "--filter"; (if testSuiteFilterFlakyTests then "TestCategory=Flaky" else "TestCategory!=Flaky")
sprintf "--logger:trx;LogFileName=%s" ("tests_result/netcore/Paket.IntegrationTests/TestResult.trx" |> Path.GetFullPath) ]
TimeOut = TimeSpan.FromMinutes 60.
ToolPath = dotnetExePath
})
)

"Clean" ==> "Publish" ==> "RunIntegrationTestsNetCore"

// --------------------------------------------------------------------------------------
// Run the unit tests

Expand All @@ -284,10 +265,10 @@ Target "RunTests" (fun _ ->
})

runTest "net" "Paket.Tests" "net461"
runTest "netcore" "Paket.Tests" "netcoreapp2.1"
runTest "netcore" "Paket.Tests" "netcoreapp3.0"

runTest "net" "Paket.Bootstrapper.Tests" "net461"
runTest "netcore" "Paket.Bootstrapper.Tests" "netcoreapp2.1"
runTest "netcore" "Paket.Bootstrapper.Tests" "netcoreapp3.0"
)

Target "QuickTest" (fun _ ->
Expand Down Expand Up @@ -346,7 +327,7 @@ Target "RunIntegrationTestsNet" (fun _ ->
DotNetCli.Test (fun c ->
{ c with
Project = "integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj"
Framework = "netcoreapp2.1"
Framework = "net461"
AdditionalArgs =
[ "--filter"; (if testSuiteFilterFlakyTests then "TestCategory=Flaky" else "TestCategory!=Flaky")
sprintf "--logger:trx;LogFileName=%s" ("tests_result/net/Paket.IntegrationTests/TestResult.trx" |> Path.GetFullPath) ]
Expand All @@ -355,10 +336,27 @@ Target "RunIntegrationTestsNet" (fun _ ->
})

)

"Clean" ==> "Publish" ==> "RunIntegrationTestsNet"


Target "RunIntegrationTestsNetCore" (fun _ ->
CreateDir "tests_result/netcore/Paket.IntegrationTests"

// improves the speed of the test-suite by disabling the runtime resolution.
System.Environment.SetEnvironmentVariable("PAKET_DISABLE_RUNTIME_RESOLUTION", "true")
DotNetCli.Test (fun c ->
{ c with
Project = "integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj"
Framework = "netcoreapp3.0"
AdditionalArgs =
[ "--filter"; (if testSuiteFilterFlakyTests then "TestCategory=Flaky" else "TestCategory!=Flaky")
sprintf "--logger:trx;LogFileName=%s" ("tests_result/netcore/Paket.IntegrationTests/TestResult.trx" |> Path.GetFullPath) ]
TimeOut = TimeSpan.FromMinutes 60.
ToolPath = dotnetExePath
})
)
"Clean" ==> "Publish" ==> "RunIntegrationTestsNetCore"

let pfx = "code-sign.pfx"
let mutable isUnsignedAllowed = true
Target "EnsurePackageSigned" (fun _ -> isUnsignedAllowed <- false)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp3.0</TargetFrameworks>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<DefineConstants Condition=" '$(TargetFramework)' != 'net461'">PAKET_NETCORE;NO_UNIT_PLATFORMATTRIBUTE;TESTSUITE_KNOWN_FAILURE_DOTNETCORE_3005;FAKE_NETSTANDARD_API;@(DefineConstants)</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net461</TargetFramework>
<TargetFrameworks>net461;netcoreapp3.0</TargetFrameworks>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/Paket.Tests/Paket.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp3.0</TargetFrameworks>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
Expand Down

0 comments on commit 2143d45

Please sign in to comment.