Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/poorlydefinedbehaviour/nyc-reporter
Github action that comments test coverage on pull request
https://github.com/poorlydefinedbehaviour/nyc-reporter
Last synced: 14 days ago
JSON representation
Github action that comments test coverage on pull request
- Host: GitHub
- URL: https://github.com/poorlydefinedbehaviour/nyc-reporter
- Owner: PoorlyDefinedBehaviour
- License: mit
- Created: 2020-11-11T23:06:11.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-22T18:38:29.000Z (about 2 years ago)
- Last Synced: 2024-10-31T10:38:58.468Z (20 days ago)
- Language: TypeScript
- Size: 28.9 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## About
Runs test command with nyc and posts coverage to pull request comments
- nyc must be listed as a dependencie on your package.json
## Inputs
### `command` **Required**
Command to run the tests
Example: `"yarn test"`### `GITHUB_TOKEN`
The GITHUB_TOKEN secret
Default: `${{ github.token }}`## Example usage
```yaml
name: "Code quality"
on: [pull_request]jobs:
check:
runs-on: ubuntu-lateststrategy:
matrix:
node-version: [12.x]steps:
- uses: actions/checkout@v2- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}- uses: bahmutov/npm-install@v1
- name: Report test coverage
uses: PoorlyDefinedBehaviour/nyc-reporter@v1
with:
command: "yarn test"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```## Preview
![Preview](./assets/nyc_reporter_preview.png)