Skip to content

Commit

Permalink
Improve README and action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Dorner committed Jan 24, 2021
1 parent 42eb11a commit 6e80010
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ jobs:
name: 'Build & Test'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # checkout the repo
- run: npm ci # install packages
- run: npm test # run tests (configured to use jest-junit reporter)
- uses: actions/checkout@v2 # checkout the repo
- run: npm ci # install packages
- run: npm test # run tests (configured to use jest-junit reporter)

- name: 'Test Report'
uses: dorny/test-reporter@v1
if: always() # run this step even if previous step failed
if: always() # run this step even if previous step failed
with:
name: 'JEST Tests' # Name of the check run which will be created
path: '__reports__/jest-*.xml' # Path to test report
reporter: 'jest-junit' # Format of test report
name: 'JEST Tests' # Name of the check run which will be created
path: 'reports/jest-*.xml' # Path to test report
reporter: 'jest-junit' # Format of test report
```
## Usage
Expand All @@ -61,7 +61,7 @@ jobs:
# jest-junit
reporter: ''

# Enables code annotations with error message and stack trace
# Enables code annotations with error message and stack trace captured during test execution
annotations: 'true'

# Set action as failed if test report contain any failed test
Expand Down Expand Up @@ -162,7 +162,7 @@ You can use following example configuration in `package.json`:
"jest-junit": "^12.0.0"
},
"jest-junit": {
"outputDirectory": "__reports__",
"outputDirectory": "reports",
"outputName": "jest-junit.xml",
"ancestorSeparator": " › ",
"uniqueOutputName": "false",
Expand All @@ -175,6 +175,9 @@ You can use following example configuration in `package.json`:
Configuration of `uniqueOutputName`, `suiteNameTemplate`, `classNameTemplate`, `titleTemplate` is important for proper visualization of test results.
</details>

## See also
- [paths-filter](https://github.com/dorny/paths-filter) - Conditionally run actions based on files modified by PR, feature branch or pushed commits

## License

The scripts and documentation in this project are released under the [MIT License](https://github.com/dorny/test-reporter/blob/master/LICENSE)
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ outputs:
runs:
using: 'node12'
main: 'dist/index.js'
branding:
color: blue
icon: file-text

0 comments on commit 6e80010

Please sign in to comment.