Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tanmen/jest-reporter
In Github actions, create annotations based on the result json of jest (see how to properly configure jest).
https://github.com/tanmen/jest-reporter
gihub-actions jest report workflow
Last synced: 2 months ago
JSON representation
In Github actions, create annotations based on the result json of jest (see how to properly configure jest).
- Host: GitHub
- URL: https://github.com/tanmen/jest-reporter
- Owner: tanmen
- License: mit
- Created: 2020-06-24T11:24:13.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-18T13:04:21.000Z (2 months ago)
- Last Synced: 2024-11-18T14:44:49.457Z (2 months ago)
- Topics: gihub-actions, jest, report, workflow
- Language: TypeScript
- Homepage:
- Size: 2.16 MB
- Stars: 5
- Watchers: 1
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Jest Reporter
Creates annotations based on the output of json (see [how to configure `jest` properly](./README.md#jest-configuration)).## Example
.github/workflows/your-workflow.yml
```
jobs:
workflow-test-step:
permissions:
contents: read
pull-requests: read
checks: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: jest --json --outputFile=result.json --testLocationInResults
- uses: tanmen/jest-reporter@v1
if: always()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
```## Inputs
### `github-token` - **required**
We'll need that to enrich the actions run with annotations.
The secret is automatically generate by github.com.### `result-file` - *optional*
The location of the json file.#### default value
```shell script
./result.json
```### `action-name` - *optional*
The action names. Make sure this name is unique within the workflow.
If it is not unique, it will be overwritten.#### default value
```
jest report
```## `jest` Configuration
```shell script
jest --json --outputFile=result.json --testLocationInResults
```