Skip to content

Commit

Permalink
customize action
Browse files Browse the repository at this point in the history
  • Loading branch information
willcaul committed Feb 17, 2021
1 parent bcc66d5 commit 1a6e899
Show file tree
Hide file tree
Showing 13 changed files with 274 additions and 280 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ Main features:

## Coverage example

![Coverage](assets/coverage.png)
![Coverage Summary](assets/coverage-summary.png)

![Coverage Details](assets/coverage-details.png)

## Check annotations example

![Fail](assets/fail.png)
![Test Failure](assets/annotation.png)

## Usage

You can now consume the action by referencing the v1 branch

```yaml
uses: mattallty/jest-github-action@v1
uses: willcaul/jest-github-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -29,7 +31,7 @@ By default, this action will execute `npm test` to run your tests.
You can change this behavior by providing a custom `test-command` like this:

```yaml
uses: mattallty/jest-github-action@v1
uses: willcaul/jest-github-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -40,7 +42,7 @@ with:
### Running tests only on changed files

```yaml
uses: mattallty/jest-github-action@v1
uses: willcaul/jest-github-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -52,7 +54,7 @@ with:
### Silencing the code coverage comment

```yaml
uses: mattallty/jest-github-action@v1
uses: willcaul/jest-github-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -65,12 +67,14 @@ with:
For running tests in folders other than root, supply a working-directory.

```yaml
uses: mattallty/jest-github-action@v1
uses: willcaul/jest-github-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
working-directory: "frontend"
```


See the [actions tab](https://github.com/mattallty/jest-github-action/actions) for runs of this action! :rocket:
## Credits

Thanks to [mattallty/jest-github-action](https://github.com/mattallty/jest-github-action), which this package is forked from, as well as [FirmNav/jest-code-coverage-commenter](https://github.com/FirmNav/jest-code-coverage-commenter), which was used as a reference for the coverage comment format.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: "Jest Annotations & Coverage"
name: "Jest GitHub Action"
description: "Jest action adding checks and annotations to your pull requests and comment them with code coverage results."
branding:
icon: "check"
color: "blue"
color: "green"
inputs:
test-command:
description: "The test command to run"
Expand Down
Binary file added assets/annotation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/coverage-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/coverage-summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/coverage.png
Binary file not shown.
Binary file removed assets/fail.png
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

Loading

0 comments on commit 1a6e899

Please sign in to comment.