Skip to content

Commit

Permalink
I think the coveralls uploaded writes error to stderr which causes Ca…
Browse files Browse the repository at this point in the history
…ke to fail the build, completely ignoring error handling. Therefore commenting out Coveralls and Codecov tasks for the time being.
  • Loading branch information
Jericho committed Nov 13, 2022
1 parent 6838b28 commit 852a803
Showing 1 changed file with 7 additions and 23 deletions.
30 changes: 7 additions & 23 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -297,37 +297,21 @@ Task("Run-Code-Coverage")

Task("Upload-Coverage-Result-Coveralls")
.IsDependentOn("Run-Code-Coverage")
.ContinueOnError()
.ReportError(exception => Information($"REPORT ERROR: Failed to upload coverage result to Coveralls: {exception.Message}"))
.OnError(exception => Information($"ONERROR: Failed to upload coverage result to Coveralls: {exception.Message}"))
.Does(() =>
{
try
{
CoverallsNet(new FilePath($"{codeCoverageDir}coverage.{DefaultFramework}.xml"), CoverallsNetReportType.OpenCover, new CoverallsNetSettings()
{
RepoToken = coverallsToken
});
}
catch (Exception e)
{
Information($"CATCH: Failed to upload coverage result to Coveralls: {e.Message}");
}
//CoverallsNet(new FilePath($"{codeCoverageDir}coverage.{DefaultFramework}.xml"), CoverallsNetReportType.OpenCover, new CoverallsNetSettings()
//{
// RepoToken = coverallsToken
//});
});

Task("Upload-Coverage-Result-Codecov")
.IsDependentOn("Run-Code-Coverage")
.ContinueOnError()
.ReportError(exception => Information($"REPORT ERROR: Failed to upload coverage result to Codecov: {exception.Message}"))
.OnError(exception => Information($"ONERROR: Failed to upload coverage result to Codecov: {exception.Message}"))
.Does(() =>
{
try
{
Codecov($"{codeCoverageDir}coverage.{DefaultFramework}.xml", codecovToken);
}
catch (Exception e)
{
Information($"CATCH: Failed to upload coverage result to Codecov: {e.Message}");
}
//Codecov($"{codeCoverageDir}coverage.{DefaultFramework}.xml", codecovToken);
});

Task("Generate-Code-Coverage-Report")
Expand Down

0 comments on commit 852a803

Please sign in to comment.