Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raulanatol/jest-coverage-comment-action
Comments a PR with the coverage (jest)
https://github.com/raulanatol/jest-coverage-comment-action
action coverage coverage-report github-actions jest pull-request
Last synced: 2 months ago
JSON representation
Comments a PR with the coverage (jest)
- Host: GitHub
- URL: https://github.com/raulanatol/jest-coverage-comment-action
- Owner: raulanatol
- License: mit
- Created: 2020-10-09T19:28:52.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-08T15:04:03.000Z (over 2 years ago)
- Last Synced: 2024-10-03T05:16:21.060Z (3 months ago)
- Topics: action, coverage, coverage-report, github-actions, jest, pull-request
- Language: TypeScript
- Homepage:
- Size: 2.43 MB
- Stars: 11
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
jest-coverage-comment-action
Comments a PR with the coverage (jest)
![message](./docs/message.png)
---
# Inputs
## `github-token`
**Required** The github token to comment in the PR.
## `jest-command`
**Optional** The command used to generate the coverage. Default: `npx jest --coverage`
## `only-changes`
**Optional** Add parameter to show the coverage only for the changed files. Default: `true`
## `working-directory`
**Optional** The command used to generate the coverage. Default: `''`
## `delete-previous`
**Optional** Delete previous comments before adding a new one. Default: `true`
## `use-existing-reports`
**Optional** If already exists a coverage report the action uses it and doesn't run tests again. Default: `false`
# Example of usage
```yaml
uses: raulanatol/jest-coverage-comment-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
```# Example using a custom jest command and working directory
**.github/workflows/main.yml**
```yaml
on: pull_requestjobs:
build:
runs-on: ubuntu-latest
steps:
- name: Hello world action step
id: hello
uses: raulanatol/jest-coverage-comment-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
jest-command: 'npm run jest-ci'
working-directory: 'packages/my-package'
```# Development
## Close release
To close a release you only need to execute the makefile with `release_{major|minor|patch}`
Example:
```shell script
make release_minor
```