Skip to content

Commit

Permalink
Include new optional inputs
Browse files Browse the repository at this point in the history
- result-label, timeout, branch, parallel and retries optional arguments included
  • Loading branch information
vicfergar committed Nov 24, 2021
1 parent 708d2bd commit 236d3a4
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 4 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Testim

This action makes the testim.io cli available to your workflows
This action makes the [testim.io cli](https://help.testim.io/docs/the-command-line-cli) available to your workflows

## Inputs

Expand All @@ -24,10 +24,30 @@ The test suite to run.

Starting URL after browser opens.

### `result-label`

The result Labels option allows you to add textual labels to your remote runs. These labels will be shown in the runs page.

### `timeout`

Timeout period in milliseconds to abort the test run if a timeout has elapsed. The default is set to 10 minutes.

### `branch`

Branch (by name) to run the tests on.

### `parallel`

How many tests should run in parallel.

### `retries`

When this flag is used, a failed test will be executed repeatedly until either the test passes or the max number of retries has been reached - in which case the test will fail.

## Example usage

```bash
uses: trax-retail/testim-cli-gh-action@v0.7.0
uses: trax-retail/testim-cli-gh-action@v0.8.0
with:
token: ${{ secrets.TESTIM_TOKEN }}
project: <PROJECT_ID>
Expand Down
23 changes: 22 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ inputs:
base-url:
description: 'Starting URL after browser opens'
required: false
result-label:
description: 'Textual label to the remote runs'
required: false
timeout:
description: 'Timeout period in milliseconds to abort the test run if a timeout has elapsed'
required: false
branch:
description: 'Branch (by name) to run the tests on'
required: false
parallel:
description: 'How many tests should run in parallel'
required: false
default: '1'
retries:
description: 'Max number of retries'
required: false
runs:
using: 'docker'
image: 'Dockerfile'
Expand All @@ -26,4 +42,9 @@ runs:
- ${{ inputs.project }}
- ${{ inputs.grid }}
- ${{ inputs.suite }}
- ${{ inputs.base-url }}
- ${{ inputs.base-url }}
- ${{ inputs.result-label }}
- ${{ inputs.timeout }}
- ${{ inputs.branch }}
- ${{ inputs.parallel }}
- ${{ inputs.retries }}
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
testim --token $1 --project $2 --grid $3 -r testim-report.xml ${4:+--suite $4} ${5:+--base-url $5}
testim --token $1 --project $2 --grid $3 -r testim-report.xml ${4:+--suite $4} ${5:+--base-url $5} ${6:+--result-label $6} ${7:+--timeout $7} ${8:+--branch $8} ${9:+--parallel $9} ${10:+--retries $10}

0 comments on commit 236d3a4

Please sign in to comment.