From 852a8030cb853aec0e078ab45bfffeee39267d25 Mon Sep 17 00:00:00 2001 From: Jericho Date: Sun, 13 Nov 2022 14:35:54 -0500 Subject: [PATCH] I think the coveralls uploaded writes error to stderr which causes Cake to fail the build, completely ignoring error handling. Therefore commenting out Coveralls and Codecov tasks for the time being. --- build.cake | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/build.cake b/build.cake index 23c23909..766b3a4c 100644 --- a/build.cake +++ b/build.cake @@ -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")