Created
February 21, 2019 23:46
-
-
Save johnmmoss/f2ae4259fa078cccda22597d5cbc4207 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#addin "nuget:?package=Cake.Incubator&version=3.1.0" | |
var target = Argument("Target", "Build"); | |
var configuration = Argument("Configuration", "Release"); | |
Task("Restore") | |
.Does(() => | |
{ | |
Information("Restoring packages..."); | |
DotNetCoreRestore(); | |
}); | |
Task("Build") | |
.IsDependentOn("Restore") | |
.Does(() => | |
{ | |
Information("Building Toaster.sln"); | |
DotNetCoreBuild("ToastMaker.sln"); | |
}); | |
Task("Run-Tests") | |
.IsDependentOn("Build") | |
.Does((context) => | |
{ | |
var args = new ProcessSettings | |
{ | |
Arguments = "run -p ToastMaker.Api/ToastMaker.Api.csproj --no-build" | |
}; | |
Information(args.Dump()); | |
using(var process = StartAndReturnProcess("dotnet", args)) | |
{ | |
Information("Running tests..."); | |
DotNetCoreTest(@"ToastMaker.IntegrationTest\ToastMaker.IntegrationTest.csproj"); | |
process.Kill(); | |
} | |
}); | |
RunTarget(target); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment