Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
malomarrec authored Nov 29, 2024
1 parent 4793e76 commit b31abc6
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,7 @@ This GitHub Action triggers a test suite execution on Heal.dev directly from you

To use the **Heal Trigger Action** in your GitHub workflow, you can configure the action using either a **suite ID** or a **suite slug name**.

### Using Suite ID

Use this method if you already have the numeric ID of the test suite and optionally the ID of the specific story you want to run from Heal.dev.

```yaml
- name: Trigger Heal Suite Execution
uses: heal-dev/trigger@main
with:
api-token: ${{ secrets.HEAL_API_TOKEN }} # Required: Your Heal API token.
suite-id: "443" # Required: The ID of the test suite.
payload: | # Optional: JSON payload for the action.
{
"stories": [
{
"id": 5053, # ID of the story to run.
"entryHref": "www.google.com" # URL to test, overrides the default setting.
"variables": # Variables to customize the test configuration.
{
"buttonName": "send"
}
}
]
}
wait-for-results: "yes" # Optional: Wait for results (default: 'yes').
domain: "https://api.heal.dev" # Optional
comment-on-pr: "yes" # Optional: Whether to comment test results on PRs (default: 'no').
```
## Inputs
| Input | Required | Description |
| ------------------ | -------- | --------------------------------------------------------------------------------------- |
| `api-token` | ✅ | Your Heal API token (you can create one [here](https://app.heal.dev/organisation/keys)) |
| `suite-id` | ✅ | The ID of the test suite. |
| `payload` | ❌ | Optional JSON payload. Use this to specify stories, override the entryHref (URL), |
| | | or provide variables to customize the test configuration. |
| `wait-for-results` | ❌ | Whether to wait for results (default: `yes`). |
| `domain` | ❌ | (default: `https://api.heal.dev`). |
| `comment-on-pr` | ❌ | Whether to comment test results on PR (default: `no`). |

### Using Suite Slug Name
### Using Suite Slug Name (recommended)

This method uses the project slug name and suite slug name. A slug is a unique, URL-friendly identifier, typically lowercase, without spaces.

Expand Down Expand Up @@ -93,3 +53,43 @@ project-slug-name/suite-slug-name (e.g., my-cool-project/end-to-end-tests).
| `wait-for-results` | ❌ | Whether to wait for results (default: `yes`). |
| `domain` | ❌ | (default: `https://api.heal.dev`). |
| `comment-on-pr` | ❌ | Whether to comment test results on PR (default: `no`). |

### Using Suite ID (legacy)

Use this method if you already have the numeric ID of the test suite and optionally the ID of the specific story you want to run from Heal.dev.

```yaml
- name: Trigger Heal Suite Execution
uses: heal-dev/trigger@main
with:
api-token: ${{ secrets.HEAL_API_TOKEN }} # Required: Your Heal API token.
suite-id: "443" # Required: The ID of the test suite.
payload: | # Optional: JSON payload for the action.
{
"stories": [
{
"id": 5053, # ID of the story to run.
"entryHref": "www.google.com" # URL to test, overrides the default setting.
"variables": # Variables to customize the test configuration.
{
"buttonName": "send"
}
}
]
}
wait-for-results: "yes" # Optional: Wait for results (default: 'yes').
domain: "https://api.heal.dev" # Optional
comment-on-pr: "yes" # Optional: Whether to comment test results on PRs (default: 'no').
```

## Inputs

| Input | Required | Description |
| ------------------ | -------- | --------------------------------------------------------------------------------------- |
| `api-token` | ✅ | Your Heal API token (you can create one [here](https://app.heal.dev/organisation/keys)) |
| `suite-id` | ✅ | The ID of the test suite. |
| `payload` | ❌ | Optional JSON payload. Use this to specify stories, override the entryHref (URL), |
| | | or provide variables to customize the test configuration. |
| `wait-for-results` | ❌ | Whether to wait for results (default: `yes`). |
| `domain` | ❌ | (default: `https://api.heal.dev`). |
| `comment-on-pr` | ❌ | Whether to comment test results on PR (default: `no`). |

0 comments on commit b31abc6

Please sign in to comment.