-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Show failing tests in the GitHub UI using Problem Matchers #10309
Comments
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. |
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. |
The related change to make this work just got merged #11320 😍 |
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. |
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.
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.
The text was updated successfully, but these errors were encountered: