Skip to content

Commit

Permalink
ThreeMammals#177 - optimise the build scripts (ThreeMammals#178)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
binarymash authored and TomPallister committed Dec 18, 2017
1 parent 79029f5 commit 194f76c
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -199,6 +192,9 @@ Task("RunAcceptanceTests")
var settings = new DotNetCoreTestSettings
{
Configuration = compileConfig,
ArgumentCustomization = args => args
.Append("--no-restore")
.Append("--no-build")
};

EnsureDirectoryExists(artifactsForAcceptanceTestsDir);
Expand All @@ -212,6 +208,9 @@ Task("RunIntegrationTests")
var settings = new DotNetCoreTestSettings
{
Configuration = compileConfig,
ArgumentCustomization = args => args
.Append("--no-restore")
.Append("--no-build")
};

EnsureDirectoryExists(artifactsForIntegrationTestsDir);
Expand Down Expand Up @@ -474,4 +473,4 @@ private bool ShouldPublishToUnstableFeed(string filter, string branchName)
Information("Branch " + branchName + " will not be published to the unstable feed");
}
return publish;
}
}

0 comments on commit 194f76c

Please sign in to comment.