Use this action to publish test results to the CloudBees platform if you are using a GitHub Actions (GHA) workflow. This action supports many popular testing tools, and enables testing results from running a GHA workflow to be displayed in the Test results tab of Run details and in the Test insights analytics dashboard.
This action is available on the GitHub marketplace.
Prerequisites
Set up the CloudBees platform and GHA to work together, providing key features of the platform to GHA workflows. Refer to Getting started for more information.
Inputs
Input name | Data type | Required? | Description |
---|---|---|---|
|
String |
Yes |
The pattern, file, or directory path of the test report to convert. |
|
String |
Yes |
The name of the testing tool[1]. |
|
String |
No |
The CloudBees platform URL.
The default value is |
[1] The testing tool name must be formatted correctly, in either all lowercase, or all uppercase.
Supported testing tools
Only the testing tools listed in the table below are supported for use in this action. |
Use the given test-type
input format to specify a testing tool.
Supported tool name |
Accepted |
|
---|---|---|
lowercase |
UPPERCASE |
|
GO |
|
|
Jest |
|
|
JUnit |
|
|
MSTest |
|
|
Playwright |
|
|
ProdPerfect |
|
|
Selenium |
|
|
TestNG |
|
|
Tosca |
|
|
This action uses GitHub OIDC authentication to securely communicate with the CloudBees platform. Be sure to set permissions to id-token: write in your workflow.
|
Usage examples
Basic example
The following is a basic example of using the v2 action:
permissions: id-token: write contents: read steps: - name: publish GHA run test results uses: cloudbees-io-gha/publish-test-results@v2 with: test-type: junit results-path: /example-dir/my-test-results
Full workflow and run example
The following GHA workflow example uses the v2 action to publish test results to the CloudBees platform.
Example GHA workflow YAML file
After the run has completed, the testing results are collected and displayed in the Test results tab of Run details and in the Test insights dashboard.
