Skip to content

Commit

Permalink
update docs for adding the workflow run identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Nilsty committed Dec 16, 2021
1 parent 4f8f1ab commit 5839906
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ curl --request POST 'https://api.github.com/repos/nilsty/robot-test-action/actio
--data-raw '{
"ref": "main",
"inputs": {
"run-id": "your workflow run identifier"
"url": "https://robotframework.org/",
"text": "Robot Framework"
}
Expand All @@ -23,6 +24,12 @@ curl --request POST 'https://api.github.com/repos/nilsty/robot-test-action/actio
The URL and text string are definded as input parameters for the github actions workflow.
[The Authorization for this request can be done via Basic Auth. The user is the Github user name and the password needs to be a Personal Access Token.](https://docs.github.com/en/rest/overview/other-authentication-methods#via-oauth-and-personal-access-tokens)

## Verify that you fetch the right test run

Based on the submitted `run-id` in your POST request to start the test run, you can identify the workflow run in Github.

The concept of the workflow run identifier is explained [here](https://stackoverflow.com/questions/69479400/get-run-id-after-triggering-a-github-workflow-dispatch-event).

## Check the test run status

You can check the status of the test run by querying the `/actions/runs` endpoint. Here is an example:
Expand All @@ -37,6 +44,18 @@ Output:
"completed"
```

## Check if a test run was successful or has failed

```
curl --request GET 'https://api.github.com/repos/nilsty/robot-test-action/actions/runs' | jq '.workflow_runs[0].conclusion'
```

Output:

```
"success" / "failure"
```

## Retrieve the test report

First you need to get the workflow id of your actions run.
Expand Down

0 comments on commit 5839906

Please sign in to comment.