Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github action check status is "neutral" when tests pass #220

Open
gotchipete opened this issue May 12, 2023 · 6 comments
Open

github action check status is "neutral" when tests pass #220

gotchipete opened this issue May 12, 2023 · 6 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@gotchipete
Copy link

gotchipete commented May 12, 2023

Bug description

When all tests pass, github still has the action marked as "neutral" instead of a pass / green check mark

How to reproduce

Run the test runner with a suite of passing tests, observe a neutral result (see screenshot):
image

  • Expected behavior

Passing tests should show a green check mark for the github action

My action code:

      - uses: game-ci/unity-test-runner@v2
        id: tests
        env:
          SOME_ENV_VAR: ${{ secrets.SOME_SECRET }}
        with:
          projectPath: ./apps/foobar
          githubToken: ${{ secrets.GITHUB_TOKEN }}
          coverageOptions: "generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;generateAdditionalReports"
      
@gotchipete gotchipete added the bug Something isn't working label May 12, 2023
@davidmfinol
Copy link
Member

davidmfinol commented May 12, 2023

Personally, I like to refer to the status of the job that runs the unit tests to see if tests have passed or not.
I also like that the unit test results show as neutral, so that they are easy to find and know that they are separate from the other jobs.

EDIT: I've marked this as wontfix for now, but I think we should keep this bug open to hear others' thoughts on this.

@davidmfinol davidmfinol added the wontfix This will not be worked on label May 12, 2023
@gotchipete
Copy link
Author

gotchipete commented May 15, 2023

@davidmfinol ah, so a way to get a green checkmark on test success is to split out the test step into its own job? Will the job actually report a fail or success in this case, since the step will still be reporting neutral? Guess I'll try it and see.

Also, I don't agree with the sentiment that the results showing neutral for "findability" is a good thing. Marking a step "neutral" when it is 100% clear as to its pass or fail status (tests passed, or one or more tests failed, respectively) just so it can be found more easily in a list seems to be a complete misuse of the property.

@timcassell
Copy link
Contributor

You could use a different test reporter to show the green checkmark, like dorny/test-reporter. See comments in #142 for details.

@gotchipete
Copy link
Author

You could use a different test reporter to show the green checkmark, like dorny/test-reporter. See comments in #142 for details.

Ahh I was looking for one, thank u @timcassell !

@davidmfinol
Copy link
Member

Will the job actually report a fail or success in this case, since the step will still be reporting neutral?

Yep, I look at the status of the test job to see if that job actually passed or failed. I wouldn't call the test report a "step". It's just additional information that supplements the actual step that is the test job.

And like @timcassell suggests you could also use a different test reporter, or you could fork this repo and have your fork modify

conclusion: 'neutral',
to change the conclusion from neutral to success.

@gotchipete
Copy link
Author

gotchipete commented May 15, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants