im-open/process-postman-test-results
Action that parses a json results file generated by the newman json reporter and creates a status check or pr comment with the results. Tests are not run as part of this action. The results can be seen on the workflow run or PR.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| github-token | Token used to interact with the repository. Generally `secrets.GITHUB_TOKEN`. | yes | — |
| results-file | The json test results file output by postman/newman json reporter. | yes | — |
| report-name | The desired name of the report that is shown on the PR Comment and inside the Status Check. | yes | Postman Test Results |
| create-status-check | Flag indicating whether a status check with test results should be generated. | yes | true |
| ignore-test-failures | If there are test failures, the check's conclusion is set to `neutral` so it will not block pull requests. *Only applicable when `create-status-check` is true.* | no | false |
| create-pr-comment | Flag indicating whether a PR comment with test results should be generated. When `true` the default behavior is to update an existing comment if one exists. | yes | true |
| update-comment-if-one-exists | This flag determines whether a new comment is created or if the action updates an existing comment (*if one is found*). *Only applicable when `create-pr-comment` is true.* | yes | true |
| comment-identifier | A unique identifier which will be added to the generated markdown as a comment (*it will not be visible in the PR comment*). This identifier enables creating then updating separate results comments on the PR if more than one instance of this action is included in a single job. This can be helpful when there are multiple test projects that run separately but are part of the same job. Defaults to GITHUB_JOB_GITHUB_ACTION if not provided. *Only applicable when `create-pr-comment` is true.* | no | — |
| timezone | IANA time zone name (e.g. America/Denver) to display dates in. If timezone is not provided, dates will be shown in UTC. | no | — |
Outputs
| name | description |
|---|---|
| test-outcome | Test outcome based on presence of failing tests: Failed|Passed. If exceptions are thrown or if it exits early because of argument errors, this is set to Failed. |
| test-results-truncated | Flag indicating whether test results were truncated due to markdown exceeding character limit of 65535. |
| test-results-file-path | File path for the file that contains the pre-truncated test results in markdown format. This is the same output that is posted in the PR comment. |
| status-check-id | The ID of the Status Check that was created. This is only set if `create-status-check` is `true` and a status check was created successfully. |
| pr-comment-id | The ID of the PR comment that was created. This is only set if `create-pr-comment` is `true` and a PR was created successfully. |