cake-contrib / Cake.Recipe

:page_with_curl: A set of convention based Cake scripts
https://cake-contrib.github.io/Cake.Recipe
MIT License
70 stars 53 forks source link

DupFinder / InspectCode fail on GitHub Actions #695

Open pascalberger opened 3 years ago

pascalberger commented 3 years ago

Don't know exactly where the issue lies (in my repo, Cake.Recipe or JetBrains tools). If I use DupFinder or InspectCode in a GitHub Actions workflow with Cake.Recipe 2.0.0-alpha0493 (or 1.1.2) I receive the following error:

========================================
DupFinder
========================================
Error: Could not find a part of the path 'D:\a\Cake.Issues.PullRequests.GitHubActions\Cake.Issues.PullRequests.GitHubActions\tools\JetBrains.ReSharper.CommandLineTools.2020.2.3\tools\ExternalAnnotations\WinRT\Windows.Foundation.FoundationContract\Windows.Foundation.FoundationContract.Nullness.Generated.xml'.
An error occurred when executing task 'DupFinder'.

See https://github.com/cake-contrib/Cake.Issues.PullRequests.GitHubActions/pull/90/checks?check_run_id=1186182362.

Workflow looks like this: https://github.com/cake-contrib/Cake.Issues.PullRequests.GitHubActions/blob/96b9ed155f7648f240798287a9f0aaf17395cd21/.github/workflows/build.yml#L9-L15

DupFinder and InspectCode both work fine on Azure Pipelines in the same repo / build.

gep13 commented 3 years ago

@AdmiringWorm am I right in saying that you saw something similar to this?

AdmiringWorm commented 3 years ago

@gep13 No, that seems to be a different error. The errors I was seeing is exceptions happening because the tool dependencies couldn't be loaded. But it could still be related to the same thing.

AdmiringWorm commented 3 years ago

I was looking a bit into this some more during the weekend, and it is actually the same as the issue I was seeing (what I said in the other issue was masking the problem).

It is an easy fix I believe, but I guess you will be taking a look at this problem during the stream tonight:smiley:

gep13 commented 3 years ago

@AdmiringWorm you are just going to leave me hanging like this?!?! 😛

Yip, let's pick this up during the stream, and fix what needs to be addressed. Assuming that you are going to be joining the stream?

gep13 commented 3 years ago

Hmm, I am able to reproduce this issue locally as well, so this isn't specific to GitHub Actions.

AdmiringWorm commented 3 years ago

Yeah, I will be joining the stream. Sufficient to say, I think it is just that the directory that the report will be created in doesn't exist. And the tool doesn't create it automatically.

AdmiringWorm commented 3 years ago

Oh, and I think the error reported that @pascalberger mentioned isn't actually the error, and in reality obscures the actual error.

I believe the issue is caused by the missing directory: BuildArtifacts/TestResults/DupFinder.

Now, I will admit that I can be completely wrong about this, but I do believe this is the cause.

gep13 commented 3 years ago

On tonight's, we figured out what the problem is here. Comes down to the length of the files that are attempting to be extracted when installing the JetBrains NuGet package. I am going to document this as a known issue on the site, and move forward with the release of Cake.Recipe 2.0.0.

Will close this issue once the docs are created.

gep13 commented 3 years ago

Screenshots for docs...

image

image

image