mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -07:00
Updated build script to continue when uploading test result fail
This commit is contained in:
parent
ec674d5682
commit
e09117824e
1 changed files with 20 additions and 10 deletions
30
build.cake
30
build.cake
|
@ -156,7 +156,7 @@ Task("Package")
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Publish")
|
Task("Publish")
|
||||||
.IsDependentOn("Run-Unit-Tests")
|
.IsDependentOn("Upload-Test-Results")
|
||||||
.IsDependentOn("PrePublish")
|
.IsDependentOn("PrePublish")
|
||||||
.IsDependentOn("Publish-Windows")
|
.IsDependentOn("Publish-Windows")
|
||||||
.IsDependentOn("Publish-Windows-32bit")
|
.IsDependentOn("Publish-Windows-32bit")
|
||||||
|
@ -263,17 +263,27 @@ Task("Run-Unit-Tests")
|
||||||
DotNetCoreTest(file.FullPath, settings);
|
DotNetCoreTest(file.FullPath, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
Task("Upload-Test-Results")
|
||||||
|
.IsDependentOn("Run-Unit-Tests")
|
||||||
|
.Does(() => {
|
||||||
var script = @"
|
var script = @"
|
||||||
$wc = New-Object 'System.Net.WebClient'
|
$wc = New-Object 'System.Net.WebClient'
|
||||||
foreach ($name in Resolve-Path .\src\**\TestResults\Test*.trx)
|
foreach ($name in Resolve-Path .\src\**\TestResults\Test*.trx)
|
||||||
{
|
{
|
||||||
Write-Host ""Uploading File: "" + $name
|
Write-Host ""Uploading File: "" + $name
|
||||||
$wc.UploadFile(""https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)"", $name)
|
$wc.UploadFile(""https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)"", $name)
|
||||||
}
|
}
|
||||||
";
|
";
|
||||||
// Upload the results
|
// Upload the results
|
||||||
StartPowershellScript(script);
|
StartPowershellScript(script);
|
||||||
});
|
}).OnError(exception =>
|
||||||
|
{
|
||||||
|
Error("Exception when attempting to upload the unit test results to AppVeyor");
|
||||||
|
Error(exception.Dump());
|
||||||
|
});
|
||||||
|
|
||||||
Task("Run-Server-Build")
|
Task("Run-Server-Build")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
|
@ -298,7 +308,7 @@ Task("Default")
|
||||||
|
|
||||||
Task("Build")
|
Task("Build")
|
||||||
.IsDependentOn("SetVersionInfo")
|
.IsDependentOn("SetVersionInfo")
|
||||||
.IsDependentOn("Run-Unit-Tests")
|
.IsDependentOn("Upload-Test-Results")
|
||||||
.IsDependentOn("Run-Server-Build");
|
.IsDependentOn("Run-Server-Build");
|
||||||
// .IsDependentOn("Run-UI-Build");
|
// .IsDependentOn("Run-UI-Build");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue