mirror of
https://github.com/dorny/test-reporter.git
synced 2026-03-21 23:52:12 +01:00
Motivation: when using a matrix job, or more than one kind of tests in a same workflow, we can end up with multiple summaries at the same time. This will lead to multiple anchors and html id that will no longer be unique. This prefix option allow to disambiguate those anchors ; and keep them functional.
134 lines
4.1 KiB
YAML
134 lines
4.1 KiB
YAML
name: Test Reporter
|
|
description: Displays test results from popular testing frameworks directly in GitHub
|
|
author: Michal Dorner <dorner.michal@gmail.com>
|
|
inputs:
|
|
artifact:
|
|
description: Name or regex of artifact containing test results
|
|
required: false
|
|
name:
|
|
description: Name of the check run
|
|
required: true
|
|
path:
|
|
description: |
|
|
Comma-separated list of paths to test results
|
|
Supports wildcards via [fast-glob](https://github.com/mrmlnc/fast-glob)
|
|
All matched result files must be of same format
|
|
required: true
|
|
path-replace-backslashes:
|
|
description: |
|
|
The fast-glob library that is internally used interprets backslashes as escape characters.
|
|
If enabled, all backslashes in provided path will be replaced by forward slashes and act as directory separators.
|
|
It might be useful when path input variable is composed dynamically from existing directory paths on Windows.
|
|
default: 'false'
|
|
required: false
|
|
reporter:
|
|
description: |
|
|
Format of test results. Supported options:
|
|
- dart-json
|
|
- dotnet-nunit
|
|
- dotnet-trx
|
|
- flutter-json
|
|
- golang-json
|
|
- java-junit
|
|
- jest-junit
|
|
- mocha-json
|
|
- tester-junit
|
|
- phpunit-junit
|
|
- python-xunit
|
|
- rspec-json
|
|
- swift-xunit
|
|
required: true
|
|
list-suites:
|
|
description: |
|
|
Limits which test suites are listed. Supported options:
|
|
- all
|
|
- failed
|
|
- none
|
|
required: false
|
|
default: 'all'
|
|
list-tests:
|
|
description: |
|
|
Limits which test cases are listed. Supported options:
|
|
- all
|
|
- failed
|
|
- none
|
|
required: false
|
|
default: 'all'
|
|
max-annotations:
|
|
description: |
|
|
Limits number of created annotations with error message and stack trace captured during test execution.
|
|
Must be less or equal to 50.
|
|
required: false
|
|
default: '10'
|
|
fail-on-error:
|
|
description: Set this action as failed if test report contain any failed test
|
|
required: false
|
|
default: 'true'
|
|
fail-on-empty:
|
|
description: Set this action as failed if no test results were found
|
|
required: true
|
|
default: 'true'
|
|
working-directory:
|
|
description: Relative path under $GITHUB_WORKSPACE where the repository was checked out
|
|
required: false
|
|
report-title:
|
|
description: Title for the test report summary
|
|
required: false
|
|
default: ''
|
|
only-summary:
|
|
description: |
|
|
Allows you to generate only the summary.
|
|
If enabled, the report will contain a table listing each test results file and the number of passed, failed, and skipped tests.
|
|
Detailed listing of test suites and test cases will be skipped.
|
|
default: 'false'
|
|
required: false
|
|
use-actions-summary:
|
|
description: |
|
|
Allows you to generate reports for Actions Summary
|
|
https://github.com/orgs/github/teams/engineering/discussions/871
|
|
default: 'true'
|
|
required: false
|
|
slug-prefix:
|
|
description: Prefix used when generating report anchor slugs
|
|
required: false
|
|
default: ''
|
|
badge-title:
|
|
description: Customize badge title
|
|
required: false
|
|
default: 'tests'
|
|
collapsed:
|
|
description: |
|
|
Controls whether test report details are collapsed or expanded. Supported options:
|
|
- auto: Collapse only if all tests pass (default behavior)
|
|
- always: Always collapse the report details
|
|
- never: Always expand the report details
|
|
required: false
|
|
default: 'auto'
|
|
token:
|
|
description: GitHub Access Token
|
|
required: false
|
|
default: ${{ github.token }}
|
|
outputs:
|
|
conclusion:
|
|
description: |
|
|
Final conclusion of the created check run:
|
|
- 'success' if no failed tests was found
|
|
- 'failure' if any failed test was found
|
|
passed:
|
|
description: Count of passed tests
|
|
failed:
|
|
description: Count of failed tests
|
|
skipped:
|
|
description: Count of skipped tests
|
|
time:
|
|
description: Test execution time [ms]
|
|
url:
|
|
description: Check run URL
|
|
url_html:
|
|
description: Check run URL HTML
|
|
runs:
|
|
using: 'node20'
|
|
main: 'dist/index.js'
|
|
branding:
|
|
color: blue
|
|
icon: file-text
|