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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show failing tests in the GitHub UI using Problem Matchers #10309

Closed
stefanbuck opened this issue Jul 23, 2020 · 5 comments
Closed

Show failing tests in the GitHub UI using Problem Matchers #10309

stefanbuck opened this issue Jul 23, 2020 · 5 comments

Comments

@stefanbuck
Copy link
Contributor

stefanbuck commented Jul 23, 2020

I already had a lengthy聽discussion with聽@SimenB about this feature a while ago. Overall he seemed quite happy with the idea. To move this聽forward and expose this idea to more people, so I opened this feature request.聽

馃殌 Feature Proposal

Report failing test cases through Problem Matchers straight on the GitHub Pull Request UI when running Jest on GitHub Actions.

image

Motivation

Consider the following scenario: Your CI is failing because a test case is failing. Sniffing through logs and figuring out what actually is broken is not a fun task.

At work, I wrote a Danger plugin that reads the failing tests and presents them as a comment on the Pull Request. This has been proven to be very useful and聽we don't want to miss it.

Screenshot of Danger plugin

We're about to switch to GitHub Actions. We could make the Danger plugin work with Actions, but there is a much better way of presenting such information now. GitHub Actions provide a neat feature called Problem Matchers. Problem Matchers allows you to add an annotation聽straight on the failing test in the diff view. Provide inline feedback right where you review your code.

Example

I already wrote a custom reporter which can produce聽the required output聽stefanbuck/jest-matcher#2. However, I'm convinced that this should be a feature of Jest and even enabled by default when running Jest on GitHub Action. GitHub sets an environment variable called聽GITHUB_ACTIONS which is聽set to true when GitHub Actions is running. This can be used to differentiate whether or not Jest runs on GitHub Actions.

Pitch

As mentioned, sniffing through logs and figuring out what actually is broken is not fun. Presenting failing tests straight away on the Pull Request without additional聽clicks has been proven to be very useful and efficient. By making this feature part of the core and even the default when running on GitHub Action, everyone will benefit automatically.聽聽

@github-actions
Copy link

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Feb 25, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@stefanbuck
Copy link
Contributor Author

The related change to make this work just got merged #11320 馃槏

@SimenB
Copy link
Member

SimenB commented Apr 5, 2022

@github-actions
Copy link

github-actions bot commented May 6, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants