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@r8

Complex Example

jobs:
  CodeCoverage:
    # ...

  UnitTesting:
    # ...

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

Parameter Summary

Goto input parameters

Parameter Name

Required

Type

Default

ubuntu_image_version

no

string

'26.04'

unittest_artifacts_pattern

no

string

'*-*TestReportSummary-XML-*'

merged_junit_filename

no

string

'Unittesting.xml'

merged_junit_artifact

no

string

''

testsuite-summary-name

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"'

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:

'26.04'

Possible Values:

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

Description:

Version of the Ubuntu image used to run the job.

Note

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

unittest_artifacts_pattern

Type:

string

Required:

no

Default Value:

'*-*TestReportSummary-XML-*'

Possible Values:

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

Description:

Pattern selecting the artifacts to download and merge.
The default matches the per-matrix-job artifacts of unit, platform and application testing, which all end in TestReportSummary-XML-<environment>. Restricting the pattern limits the number of downloaded artifacts and thereby the generated traffic.

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.

testsuite-summary-name

Type:

string

Required:

no

Default Value:

''

Possible Values:

Any valid name for a testsuite summary.

Description:

Name of the TestsuiteSummary in the merged JUnit XML file.
If empty, the name found in the merged reports is kept. Usually set to the package name, so the report stays identifiable when several packages publish to the same service.

merge-input-dialect

Type:

string

Required:

no

Default Value:

'pyTest-JUnit'

Possible Values:

Any JUnit dialect supported by pyEDAA.Reports, e.g. 'pyTest-JUnit', 'Ant-JUnit', 'CTest-JUnit' or 'GoogleTest-JUnit'.
See JUnit Dialects for the complete list.

Description:

JUnit dialect used to read and parse the downloaded reports.
JUnit XML has no single specification - test frameworks emit structurally different files, so the dialect must match the framework that produced them.

merge-output-dialect

Type:

string

Required:

no

Default Value:

'pyTest-JUnit'

Possible Values:

Any JUnit dialect supported by pyEDAA.Reports.
See JUnit Dialects for the complete list.

Description:

JUnit dialect used to write the merged report.
Choose the dialect understood by the service consuming the merged file.

merged_junit_artifact

Type:

string

Required:

no

Default Value:

''

Possible Values:

Any valid artifact name.

Description:

Name of the artifact receiving the merged JUnit XML file.
If empty, the merged report is published to the configured services, but not kept as an artifact - so no later job can consume it. SphinxDocumentation downloads this artifact to embed the unit test report into the documentation.

additional_merge_args

Type:

string

Required:

no

Default Value:

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

Possible Values:

Any additional command line arguments accepted by pyedaa-reports unittest.
See Transforming the reports’ hierarchy and pytest specific transformations for the available transformations.

Description:

Additional arguments passed to the merge operation.
The default rewrites the dunder __init__ test suites and reduces the hierarchy depth, so the merged report is not dominated by the directory structure of the test suite.

publish

Type:

string

Required:

no

Default Value:

'true'

Possible Values:

'true' / 'false'

Description:

Publish the merged results as a report page in the pipeline summary.
The report page is created when this or dorny is true and report_title is not empty.
'true' - create the report page.
'false' - do not create it.

report_title

Type:

string

Required:

no

Default Value:

'Unit Test Results'

Possible Values:

Any title. An empty string disables the report page.

Description:

Title of the report page in the pipeline summary.
An empty title skips publishing, regardless of publish and dorny.

dorny

Type:

string

Required:

no

Default Value:

'true'

Possible Values:

'true' / 'false'

Description:

Publish the merged results using Test Reporter (GitHub: dorny/test-reporter).
'true' - create the report page.
'false' - do not create it.

codecov

Type:

string

Required:

no

Default Value:

'false'

Possible Values:

'true' / 'false'

Description:

Publish the merged results to CodeCov.
'true' - publish; the CODECOV_TOKEN secret must be set.
'false' - do not publish.

codecov_flags

Type:

string

Required:

no

Default Value:

'unittest'

Possible Values:

A comma separated list of Codecov flags.

Description:

Flags attached to the upload, so Codecov can separate the results of different test kinds.
Only used when codecov is 'true'.

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).