Skip to content

Commit

Permalink
Publishing the test results to azure pipeline and appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Nov 8, 2018
1 parent 08d35ca commit 6c1a3a7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ Task("Publish-AppVeyor")
{
if (FileExists(package.PackagePath)) { AppVeyor.UploadArtifact(package.PackagePath); }
}

if (FileExists(parameters.Paths.Files.TestCoverageOutputFilePath)) {
AppVeyor.UploadTestResults(parameters.Paths.Files.TestCoverageOutputFilePath, AppVeyorTestResultsType.NUnit3);
}
})
.OnError(exception =>
{
Expand All @@ -473,6 +477,14 @@ Task("Publish-AzurePipeline")
{
if (FileExists(package.PackagePath)) { TFBuild.Commands.UploadArtifact("packages", package.PackagePath, package.PackageName); }
}

if (FileExists(parameters.Paths.Files.TestCoverageOutputFilePath)) {
var data = new TFBuildPublishTestResultsData {
TestResultsFiles = new[] { parameters.Paths.Files.TestCoverageOutputFilePath.ToString() },
TestRunner = TFTestRunnerType.NUnit
};
TFBuild.Commands.PublishTestResults(data);
}
})
.OnError(exception =>
{
Expand Down

0 comments on commit 6c1a3a7

Please sign in to comment.