Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae6f6b4

Browse files
author
Iddo Gino
committed
added readme
1 parent a8824a0 commit ae6f6b4

File tree

3 files changed

+66
-2
lines changed

3 files changed

+66
-2
lines changed

README.md

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,60 @@
1-
##TBD
1+
# RapidAPI Testing GitHub Actions
2+
3+
This GitHub Action allows you to trigger the execution of RapidAPI Testing tests.
4+
5+
## Complete example
6+
7+
```yaml
8+
on: [push]
9+
10+
jobs:
11+
run_api_test:
12+
runs-on: ubuntu-latest
13+
name: Execute RapidAPI API Tests
14+
steps:
15+
- name: Execute Tests
16+
id: tstExec
17+
uses: RapidAPI/gh-api-testing-trigger@master
18+
with:
19+
test: 'YOUR_TEST_ID'
20+
location: 'AWS-US-WEST-2'
21+
environment: 'ENV_ID(OPTIONAL)'
22+
- name: Show Results
23+
run: echo "The test took ${{ steps.tstExec.outputs.time }}ms to run"; echo "The test result was ${{ steps.tstExec.outputs.succesful }}"; echo "View Report - {{ steps.tstExec.outputs.reportUrl }}"
24+
```
25+
26+
## Inputs
27+
28+
### `test`
29+
**Required** The ID of the test you wish to execute.
30+
31+
### `location`
32+
**Required** The location the test will be executed in. Options:
33+
34+
- `AWS-US-EAST-1` : N. Virginia
35+
- `AWS-US-WEST-2` : Oregon
36+
- `AWS-AP-EAST-1` : Hong Kong
37+
- `AWS-AP-SOUTH-1` : Mumbai
38+
- `AWS-AP-SOUTHEAST-1` :
39+
- `AWS-AP-NORTHEAST-1` : Tokyo
40+
- `AWS-EU-CENTRAL-1` : Frankfurt
41+
- `AWS-EU-WEST-3` : Paris
42+
- `AWS-SA-EAST-1` : São Paulo
43+
44+
### `location`
45+
The environment you want to run the test in. If you don't use environment omit this parameter
46+
47+
## Outputs
48+
49+
### `time`
50+
The time it took the test to execute, in miliseconds (1000ms=s)
51+
52+
### `succesful`
53+
True/false based on the result of the test execution
54+
55+
### `reportUrl`
56+
URL of a human readable report of the test execution
57+
58+
## Help
59+
60+
For any help using this integration, reach out to `[email protected]`.

action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ inputs:
1212
description: 'The environment ID the test will run in'
1313
required: false
1414
outputs:
15-
executionTime:
15+
time:
1616
description: 'How long the test took to execute'
17+
succesful:
18+
description: 'True or false based on the outcome of the test execution'
19+
reportUrl:
20+
description: 'Url for the full test execution URL'
1721
runs:
1822
using: 'node12'
1923
main: 'index.js'

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ core.group('Execute Test', async () => {
5252
// 3. Set Response Data
5353
core.setOutput("time", testResult.executionTime);
5454
core.setOutput("succesful", testResult.succesful);
55+
core.setOutput("reportUrl", testTrigger.reportUrl);
5556

5657
// 4. Fail action if test failed
5758
if (!testResult.succesful) {

0 commit comments

Comments
 (0)