-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.fsx
39 lines (32 loc) · 869 Bytes
/
build.fsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// include Fake lib
#r "packages/build/FAKE/tools/FakeLib.dll"
open Fake
open Fake.Testing
open System
open System.IO
let artifactDir = "artifacts"
let solutionFile = "src/Reactive.Config.sln"
let testAssemblies = "src/**/bin/Release/*Tests*.dll"
MSBuildDefaults <- { MSBuildDefaults with Verbosity = Some MSBuildVerbosity.Minimal }
Target "Clean" (fun _ ->
CleanDirs [artifactDir]
)
Target "Build" (fun _ ->
!! solutionFile
|> MSBuildRelease "" "Clean;Rebuild"
|> ignore
)
Target "RunTests" (fun _ ->
let nunitRunnerPath = "packages/build/NUnit.ConsoleRunner/tools/nunit3-console.exe"
!! testAssemblies
|> NUnit3 (fun p ->
{ p with
OutputDir = artifactDir + "\TestResults.xml"
ToolPath = nunitRunnerPath
})
)
"Clean"
==> "Build"
==> "RunTests"
// start build
RunTargetOrDefault "RunTests"