PublishTestResults

This job downloads all matching JUnit report artifacts, merged the reports into one single report and then publishes the JUnit test summary reports to multiple services for visualization and longterm statistical tracking.

Supported services are:

Instantiation

Simple Example

jobs:
  PublishTestResults:
    uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r5

Complex Example

jobs:
  CodeCoverage:
    # ...

  UnitTesting:
    # ...

  PublishTestResults:
    uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r5
    needs:
      - CodeCoverage
      - UnitTesting

Parameter Summary

Goto input parameters

Parameter Name

Required

Type

Default

ubuntu_image_version

no

string

'24.04'

unittest_artifacts_pattern

no

string

'*-UnitTestReportSummary-XML-*'

merged_junit_filename

no

string

'Unittesting.xml'

merged_junit_artifact

no

string

''

merge-input-dialect

no

string

'pyTest-JUnit'

merge-output-dialect

no

string

'pyTest-JUnit'

additional_merge_args

no

string

'"--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit"'

testsuite-summary-name

no

string

''

publish

no

string

'true'

report_title

no

string

'Unit Test Results'

dorny

no

string

'true'

codecov

no

string

'false'

codecov_flags

no

string

'unittest'

Goto secrets

Token Name

Required

Type

Default

CODECOV_TOKEN

no

string

— — — —

Goto output parameters

This job template has no output parameters.

Input Parameters

ubuntu_image_version

Type:

string

Required:

no

Default Value:

'24.04'

Possible Values:

See actions/runner-images - Available Images for available Ubuntu image versions.

Description:

Version of the Ubuntu image used to run this job.

Note

Unfortunately, GitHub Actions has only a limited set of functions, thus, the usual Ubuntu image name like 'ubuntu-24.04' can’t be split into image name and image version.

unittest_artifacts_pattern

Type:

string

Required:

no

Default Value:

'*-UnitTestReportSummary-XML-*'

Possible Values:

Any valid artifact matching pattern using fixed text and * characters.

Description:

tbd

merged_junit_filename

Type:

string

Required:

no

Default Value:

'Unittesting.xml'

Possible Values:

Any valid filename suitable for a JUnit XML report.

Description:

The filename for the merged JUnit report in XML format.
See merge-output-dialect for the used JUnit dialect in the merged report file.

merged_junit_artifact

Type:

string

Required:

no

Default Value:

''

Possible Values:

Any valid artifact name.

Description:

merge-input-dialect

Type:

string

Required:

no

Default Value:

'pyTest-JUnit'

Possible Values:

tbd

Description:

tbd

merge-output-dialect

Type:

string

Required:

no

Default Value:

'pyTest-JUnit'

Possible Values:

tbd

Description:

tbd

additional_merge_args

Type:

string

Required:

no

Default Value:

'"--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit"'

Possible Values:

tbd

Description:

tbd

testsuite-summary-name

Type:

string

Required:

no

Default Value:

''

Possible Values:

tbd

Description:

tbd

publish

Type:

string

Required:

no

Default Value:

'true'

Possible Values:

tbd

Description:

tbd

report_title

Type:

string

Required:

no

Default Value:

'Unit Test Results'

Possible Values:

tbd

Description:

tbd

dorny

Type:

string

Required:

no

Default Value:

'true'

Possible Values:

tbd

Description:

tbd

codecov

Type:

string

Required:

no

Default Value:

'false'

Possible Values:

tbd

Description:

tbd

codecov_flags

Type:

string

Required:

no

Default Value:

'unittest'

Possible Values:

tbd

Description:

tbd

Secrets

CODECOV_TOKEN

Type:

string

Required:

no

Default Value:

— — — —

Description:

The token to publish unit test results on Codecov.

Outputs

This job template has no output parameters.

Optimizations

This template offers no optimizations (reduced job runtime).

merged_junit_artifact