Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Expecto.BenchmarkDotNet.Tests during the build #507

Merged
merged 1 commit into from
Aug 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ let build project =
Common = DotNet.Options.withDotNetCliPath dotnetExePath p.Common })
project

let runTest project =
Trace.logfn "Running %s on .NET Core" project
DotNet.exec (DotNet.Options.withDotNetCliPath dotnetExePath)
(sprintf "run --framework %s --project %s -c %O" testFramework project configuration)
"--summary"
|> fun r -> if r.ExitCode <> 0 then failwithf "Running %s on .NET Core failed" project

Target.create "BuildExpecto" (fun _ ->
let sln = NoSln.WriteSolutionFile(projects=libProjects, useTempSolutionFile=true)
build sln
Expand All @@ -90,13 +97,6 @@ Target.create "BuildTest" (fun _ ->

Target.create "RunTest" <| fun _ ->

let runTest project =
Trace.logfn "Running %s on .NET Core" project
DotNet.exec (DotNet.Options.withDotNetCliPath dotnetExePath)
(sprintf "run --framework %s --project %s -c %O" testFramework project configuration)
"--summary"
|> fun r -> if r.ExitCode <> 0 then failwithf "Running %s on .NET Core failed" project

runTest "Expecto.Tests"
"Expecto.Tests.TestResults.xml"
|> Path.combine (Path.combine __SOURCE_DIRECTORY__ "bin")
Expand All @@ -111,6 +111,10 @@ Target.create "RunTest" <| fun _ ->
runTest "Expecto.Focused.Tests"
runTest "Expecto.Tests.FsCheck3"

Target.create "RunBenchmarkDotNetTest" <| fun _ ->

runTest "Expecto.BenchmarkDotNet.Tests"

Target.create "Pack" <| fun _ ->
let args =
{ MSBuild.CliArguments.Create() with
Expand Down Expand Up @@ -177,6 +181,7 @@ Target.create "All" ignore
==> "BuildBenchmarkDotNet"
==> "BuildTest"
==> "RunTest"
==> "RunBenchmarkDotNetTest"
==> "Pack"
==> "All"
==> "Push"
Expand Down
Loading