mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
Improve README and action.yml
This commit is contained in:
parent
42eb11a3c8
commit
6e80010de8
2 changed files with 15 additions and 9 deletions
21
README.md
21
README.md
|
|
@ -27,17 +27,17 @@ jobs:
|
||||||
name: 'Build & Test'
|
name: 'Build & Test'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2 # checkout the repo
|
- uses: actions/checkout@v2 # checkout the repo
|
||||||
- run: npm ci # install packages
|
- run: npm ci # install packages
|
||||||
- run: npm test # run tests (configured to use jest-junit reporter)
|
- run: npm test # run tests (configured to use jest-junit reporter)
|
||||||
|
|
||||||
- name: 'Test Report'
|
- name: 'Test Report'
|
||||||
uses: dorny/test-reporter@v1
|
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:
|
with:
|
||||||
name: 'JEST Tests' # Name of the check run which will be created
|
name: 'JEST Tests' # Name of the check run which will be created
|
||||||
path: '__reports__/jest-*.xml' # Path to test report
|
path: 'reports/jest-*.xml' # Path to test report
|
||||||
reporter: 'jest-junit' # Format of test report
|
reporter: 'jest-junit' # Format of test report
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
@ -61,7 +61,7 @@ jobs:
|
||||||
# jest-junit
|
# jest-junit
|
||||||
reporter: ''
|
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'
|
annotations: 'true'
|
||||||
|
|
||||||
# Set action as failed if test report contain any failed test
|
# Set action as failed if test report contain any failed test
|
||||||
|
|
@ -162,7 +162,7 @@ You can use following example configuration in `package.json`:
|
||||||
"jest-junit": "^12.0.0"
|
"jest-junit": "^12.0.0"
|
||||||
},
|
},
|
||||||
"jest-junit": {
|
"jest-junit": {
|
||||||
"outputDirectory": "__reports__",
|
"outputDirectory": "reports",
|
||||||
"outputName": "jest-junit.xml",
|
"outputName": "jest-junit.xml",
|
||||||
"ancestorSeparator": " › ",
|
"ancestorSeparator": " › ",
|
||||||
"uniqueOutputName": "false",
|
"uniqueOutputName": "false",
|
||||||
|
|
@ -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.
|
Configuration of `uniqueOutputName`, `suiteNameTemplate`, `classNameTemplate`, `titleTemplate` is important for proper visualization of test results.
|
||||||
</details>
|
</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
|
## License
|
||||||
|
|
||||||
The scripts and documentation in this project are released under the [MIT License](https://github.com/dorny/test-reporter/blob/master/LICENSE)
|
The scripts and documentation in this project are released under the [MIT License](https://github.com/dorny/test-reporter/blob/master/LICENSE)
|
||||||
|
|
|
||||||
|
|
@ -42,3 +42,6 @@ outputs:
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
branding:
|
||||||
|
color: blue
|
||||||
|
icon: file-text
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue