Giter Club home page Giter Club logo

githubactionstestlogger's Introduction


👋 Hi there!

My name is Oleksii and I do open source for fun. The projects you will find on this profile are just random things I've built at one point or another to make my life easier. Hopefully they can be useful to you as well!

Socials

Blog YouTube Twitter Discord

Stats

githubactionstestlogger's People

Contributors

tyrrrz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

githubactionstestlogger's Issues

Second report does not render correctly

Version

2.2.0

Details

After updating to 2.2.0, if more than one test project is included in a GitHub Actions workflow where other content is also written to the step summary, the title of the second test run report does not render correctly.

Attached are two screenshots showing the rendering before and after the change.

Before

IMG_0451

Workflow

After

IMG_0452

Steps to reproduce

Clone justeattakeaway/httpclient-interception@3274754 and run build.ps1 in GitHub Actions.

Option to disable emitting warnings

Thanks for a great module!

This currently emits warnings, which is a great thing. Unfortunately, the Github Actions UI for annotations isn't very good, and simply displays warning and error annotations as a big list, without any sorting or grouping. This means that if I have many test skips, I have to scour the list for any errors in between those errors... A good example is this build.

Ideally Github will make their UI better (I sent a request on their help/support page), but in the meantime it may be good to provide an option to disable showing warnings altogether. Even without this UI bug, some people are likely not interested in these.

Tests fail with exit code 1 when NuGet is not imported in the project.

Version

2.3.3

Platform

.NET 7.0

Steps to reproduce

  - name: Test with the dotnet CLI
    run: >
      dotnet test
      --no-build
      --configuration Release
      --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
      --
      RunConfiguration.CollectSourceInformation=true

See: https://github.com/passwordless/passwordless-server/actions/runs/6325650703

Details

  • Expected behavior: If NuGet is not present, make sure tests still pass, but skip the reporting then for that project?

Checklist

  • I have looked through existing issues to make sure that this bug has not been reported before
  • I have provided a descriptive title for this issue
  • I have made sure that that this bug is reproducible on the latest version of the package
  • I have provided all the information needed to reproduce this bug as efficiently as possible
  • I have sponsored this project

Use without adding to project?

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'.

Add runtime version (or customizable title)

I've been testing out this project (works great btw 👍) and I think one thing that's missing is including the framework/runtime version in the annotation. I wanted to start a discussion here, first of all to say thanks for a great project 👏 👏 👏 - and in case anyone else ran into the same thing.

I'm in a situation where I need to test both netcoreapp3.1 and net5 and I don't want to be confusing to people why they see the same error reported twice:

image


It would be great if there was an option to include the runtime version, or if not to find some strategy where I could customize this. For instance right now I'm not specifying a target framework at the command line, and letting dotnet test do its magic. I could easily change this if it makes the error reporting experience better.

One of the ideas here would be to use a matrix and make that part of the job name.

Example:

test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        dotnet-version: [3.1.x, 5.0.x]

    name: Test ${{ matrix.dotnet-version }}

Not working when tests run inside a docker container

Thanks for the package - it's just what I was looking for.

Cant seem to get it working when i run my tests in docker-compose on github actions though. Perhaps because the lines are prefixed with the container name in the output?

tests_1  | [xUnit.net 00:00:00.77]   Finished:    xxxxx.Tests
tests_1  | 
tests_1  | Test run for /sln/tests/xxxxx/bin/Release/netcoreapp3.1/xxxxx.dll(.NETCoreApp,Version=v3.1)
tests_1  | ::error file=/sln/tests/xxxxx/Demo.cs,line=8::xxxxx.Tests.Demo.This_will_fail: Assert.True() Failure
tests_1  |   X xxxxxxxx.Tests.Demo.This_will_fail [2ms]
tests_1  |   Error Message:
tests_1  |    Assert.True() Failure
tests_1  | Expected: True
tests_1  | Actual:   False
tests_1  |   Stack Trace:
tests_1  |      at xxxxx.Tests.Demo.This_will_fail() in /sln/tests/xxxxx.Tests/Demo.cs:line 8

Links to code for failed test 404 when deterministic builds are used

Version

2.0.2

Details

If deterministic builds are enabled for a project, links to failing tests from the stack traces 404 instead of linking correctly to the code as they contain an incorrect /_/ segment in the GitHub link.

See this example for such a broken link.

A comparison of a broken and working link is shown below:

- https://github.com/martincostello/dependabot-helper/blob/06003a012895c3b1d70f7f1829e3fdd128180d0c/_/tests/DependabotHelper.Tests/ApiTests.cs#L1363
+ https://github.com/martincostello/dependabot-helper/blob/06003a012895c3b1d70f7f1829e3fdd128180d0c/tests/DependabotHelper.Tests/ApiTests.cs#L1363

Steps to reproduce

Clone martincostello/dependabot-helper@74df38b and build in a GitHub Actions workflow with build.ps1 in the root of the repository.

There is no output from nunit results

It seems nunit (possibly xunit) test results are showing only in console as a summary of passed/failed - should any additional output be produced with GitHubActions enabled?

Test summary is enormous

Details

I really like the summary emitted by the test logger. However, will the aggregate statistics (total pass/fail/skip) are great, the test-per-test listing is huge, for projects which have lots of test (see this as an example).

I'd suggest showing this collapsed by default (so users click to open it), or possibly to make it opt-in/opt-out in the build (but keep the aggregate statistics!).

Working with different paths inside docker based tests

A bit of an interesting issue since it's fair to say I'm not using this tool exactly as would be expected. Essentially we build in docker and test in docker, the problem here is that the file paths don't match the git repo.

What options are there for manipulating those paths which are output? The only way I can think of now is changing the output directories inside the docker container to more closely match the git repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.