Tyrrrz / GitHubActionsTestLogger

.NET test logger that reports to GitHub Actions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use without adding to project?

Bouke opened this issue · comments

Details

I have a few test projects in my solution. I'd rather not add this project's package to each test project, but only install it in the workflow. I don't know if this can be achieved in some way, as there's a strong focus on nuget packages it seems. Ideally I'd only have to run something like dotnet tool install (-g) ... to be able to use this logger.

I've also tried using the dll directly, but that doesn't work as well:

dotnet test --logger=/Users/bouke/Downloads/githubactionstestlogger.1.2.0/lib/netstandard2.0/GitHubActions.TestLogger.dll

Starting test execution, please wait...
Could not find a test logger with AssemblyQualifiedName, URI or FriendlyName 'file:///Users/bouke/Downloads/githubactionstestlogger.1.2.0/lib/netstandard2.0/GitHubActions.TestLogger.dll'.

Hello. We are installing GithubActionsTestLogger during CI tests run like this:

dotnet add PATH/TO.csproj package GitHubActionsTestLogger

Thank you for the suggestion. However, I still would have to install it for every test project, which causes additional upkeep. I'd rather have something in my workflow that "just works".

@Bouke you can install the project at the solution level by using Directory.Build.props. Next major NuGet release will also include tooling to manage centralized packages more seamlessly, but you can already do this now manually.

Apart from this and what @SonicGD suggested, I don't think there are any other solutions.