Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
imadx committed Jun 10, 2022
1 parent 14d89a7 commit 57c7083
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This action allows Jest to be run in shards and reports merged coverage to the c

## Inputs

### with 'run-tests' command

| Input | Required | Default | Description |
| ---------------------- | :------: | -------------- | --------------------------------------------------------------------------------- |
| `github-token` || `GITHUB_TOKEN` | Github Token for the workflow |
Expand All @@ -12,6 +14,15 @@ This action allows Jest to be run in shards and reports merged coverage to the c
| `shard` | | `1/1` | Jest shard to be executed for`run-tests` command (eg: `1/4`) |
| `skip-artifact-upload` | | `false` | Avoid uploading coverage results, if all the actions are running in a single step |

### with 'merge-coverage' command

| Input | Required | Default | Description |
| ---------------------- | :------: | -------------- | --------------------------------------------------------------------------------- |
| `github-token` || `GITHUB_TOKEN` | Github Token for the workflow |
| `command` || `run-tests` | Action to run. <br /> Available commands: `run-tests`, `merge-coverage` |
| `shard-count` | | `1` | Shard count need to be defined `merge-coverage` command |
| `skip-artifact-upload` | | `false` | Avoid uploading coverage results, if all the actions are running in a single step |

## Example with a matrix

> Note: if running multiple shards, `shard` (for `run-tests` command) and `shard-count` for `merge-coverage` command) need to be defined.
Expand All @@ -34,7 +45,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: "16.x"
- uses: imadx/jest-action@v0.3
- uses: imadx/jest-action@v0.4
with:
command: "run-tests"
shard: ${{ matrix.shard }}
Expand All @@ -47,7 +58,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: "16.x"
- uses: imadx/jest-action@v0.3
- uses: imadx/jest-action@v0.4
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
command: "merge-coverage"
Expand Down

1 comment on commit 57c7083

@imadx
Copy link
Owner Author

@imadx imadx commented on 57c7083 Jun 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Coverage

Covered/Total Percentage
Statements 8/10 80% 🟠
Branches 0/1 0% 🔴
Functions 2/3 66.66% 🟠
Lines 3/5 60% 🔴

Please sign in to comment.