synthetics-ci-github-action
synthetics-ci-github-action copied to clipboard
Expose results via outputs
It would be extremely helpful if the data shown in the action's logs could also be set as outputs for accessibility in other parts of a workflow. For example, adding the report as a comment on a PR, extracting links and appending to a PR, external notification of pass/fail status.
I do not know the entire structure of synthetic tests, but based on this run as an example, I would see the following outputs being useful:
-
result: succeeded|failed -
resultsUrl: https://app.datadoghq.com/synthetics/explorer/ci?batchResultId=1eba11d9-e0f8-43c0-ba2c-dfce4f4c0dab -
criticalErrors: int -
passed: int -
failedNonBlocking: int -
failed: int -
skipped: int -
notFound: int -
timedOut: int -
report: string(the entire string from === REPORT == and below) -
testRuns: array(output as a json string)
[
{
"passed":2,
"failed":0,
"batchUrl":"https://app.datadoghq.com/synthetics/explorer/ci?batchResultId=1eba11d9-e0f8-43c0-ba2c-dfce4f4c0dab",
"runs":[
{
"id":"2r9-q7u-4nn",
"detailsUrl":"https://app.datadoghq.com/synthetics/details/2r9-q7u-4nn/result/3868113174340701979?from_ci=true",
"device":"chrome.laptop_large",
"duration":1204,
"location":"Paris (AWS)",
"name":"[DO_NOT_DELETE] Used in `datadog-ci` repo for CI testing",
"result":"passed|failed"
}
]
}
]
Hi @aknosis! Sorry for the delay, and thank you for the feature request!
That's a really good idea, we added it to our backlog 🙇