From 194f76cf7ffc05cc323b5c373e6755bcd24ccd34 Mon Sep 17 00:00:00 2001 From: Philip Wood Date: Mon, 18 Dec 2017 22:11:17 +0000 Subject: [PATCH] #177 - optimise the build scripts (#178) * Remove explicit restore, and don't rebuild during tests. This currently fails because the release config doesn't contain symbols needed by opencover. * Build unit tests in debug Turns out that for test coverage we need to have debug symbols. --- build.cake | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/build.cake b/build.cake index e988060e..12fcbdd0 100644 --- a/build.cake +++ b/build.cake @@ -102,17 +102,10 @@ Task("Version") } }); -Task("Restore") +Task("Compile") .IsDependentOn("Clean") .IsDependentOn("Version") .Does(() => - { - DotNetCoreRestore(slnFile); - }); - -Task("Compile") - .IsDependentOn("Restore") - .Does(() => { var settings = new DotNetCoreBuildSettings { @@ -199,6 +192,9 @@ Task("RunAcceptanceTests") var settings = new DotNetCoreTestSettings { Configuration = compileConfig, + ArgumentCustomization = args => args + .Append("--no-restore") + .Append("--no-build") }; EnsureDirectoryExists(artifactsForAcceptanceTestsDir); @@ -212,6 +208,9 @@ Task("RunIntegrationTests") var settings = new DotNetCoreTestSettings { Configuration = compileConfig, + ArgumentCustomization = args => args + .Append("--no-restore") + .Append("--no-build") }; EnsureDirectoryExists(artifactsForIntegrationTestsDir); @@ -474,4 +473,4 @@ private bool ShouldPublishToUnstableFeed(string filter, string branchName) Information("Branch " + branchName + " will not be published to the unstable feed"); } return publish; -} \ No newline at end of file +}