-
Notifications
You must be signed in to change notification settings - Fork 26
/
build.cake
41 lines (34 loc) · 1.13 KB
/
build.cake
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
40
41
#tool "nuget:?package=xunit.runner.console"
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
Task("dotnet-restore")
.Does(() =>
{
DotNetCoreRestore("./Valit.sln");
});
Task("dotnet-build")
.IsDependentOn("dotnet-restore")
.Does(() =>
{
DotNetCoreBuild("./Valit.sln", new DotNetCoreBuildSettings
{
Configuration = configuration,
MSBuildSettings = new DotNetCoreMSBuildSettings
{
TreatAllWarningsAs = MSBuildTreatAllWarningsAs.Error
}
});
});
Task("run-xunit-tests")
.IsDependentOn("dotnet-build")
.Does(() =>
{
var settings = new DotNetCoreTestSettings
{
Configuration = configuration
};
DotNetCoreTest("./tests/Valit.Tests/Valit.Tests.csproj", settings);
});
Task("Default")
.IsDependentOn("run-xunit-tests");
RunTarget(target);