-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathaction.yml
More file actions
144 lines (127 loc) · 4.39 KB
/
action.yml
File metadata and controls
144 lines (127 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: Rainforest QA GitHub Action
description: Easily trigger a Rainforest Run from your GitHub workflows
inputs:
#
# Rainforest API parameters
#
description:
description: An arbitrary string to associate with the run
required: false
default: ''
run_group_id:
description: Only run tests tied to this Run Group
required: true
environment_id:
description: Use a specific environment for this run
required: false
default: ''
custom_url:
description: Use a specific URL for this run
required: false
default: ''
conflict:
description: How other currently in-progress runs should be handled. Values are `cancel` to cancel runs in the same environment as your new run and `cancel-all` to cancel all runs
required: false
default: ''
execution_method:
description: The execution method to use for this run
required: false
default: ''
crowd:
description: "DEPRECATED: Use `execution_method` instead"
required: false
default: ''
deprecationMessage: "Use `execution_method` instead. For more information, see https://github.com/rainforestapp/github-action/releases/tag/v2.1.0."
release:
description: Manually entered release information about the release the run is associated with
required: false
default: ''
automation_max_retries:
description: If set to a value > 0 and a test fails, it will be retried within the same run, up to that number of times
required: false
default: ''
branch:
description: Use a specific Rainforest branch for this run
required: false
default: ''
token:
description: Your Rainforest QA API token
required: true
#
# Rainforest CLI flags
#
background:
description: Do not wait for a run to complete before exiting
required: false
default: ''
#
# GitHub Action-specific inputs
#
dry_run:
description: Set to true to run parameter validations without starting a new Rainforest run
required: false
default: ''
cache_key:
description: The cache key to use for saving/restoring a Rainforest run ID (used to rerun failed tests)
required: false
default: '${{ github.job }}-${{ github.action }}'
outputs:
command:
description: The CLI command that was run
value: ${{ steps.validate.outputs.command }}
error:
description: The validation error that was raised
value: ${{ steps.validate.outputs.error }}
runs:
using: composite
steps:
- name: Set Action Version
shell: bash
run: |
echo "RF_ACTION_VERSION=3.2.6" >> $GITHUB_ENV
- name: Check for reruns
uses: pat-s/always-upload-cache@v3
if: (! inputs.dry_run)
with:
key: rainforest-run-${{ github.run_id }}-${{ inputs.cache_key }}-${{ github.run_attempt }}
path: .rainforest_run_id
restore-keys: |
rainforest-run-${{ github.run_id }}-${{ inputs.cache_key }}-
- name: Validate Parameters
shell: bash
id: validate
env:
RF_DESCRIPTION: ${{ inputs.description }}
RF_RUN_GROUP_ID: ${{ inputs.run_group_id }}
RF_ENVIRONMENT_ID: ${{ inputs.environment_id }}
RF_CUSTOM_URL: ${{ inputs.custom_url }}
RF_CONFLICT: ${{ inputs.conflict }}
RF_EXECUTION_METHOD: ${{ inputs.execution_method }}
RF_CROWD: ${{ inputs.crowd }}
RF_RELEASE: ${{ inputs.release }}
RF_AUTOMATION_MAX_RETRIES: ${{ inputs.automation_max_retries }}
RF_BRANCH: ${{ inputs.branch }}
RF_TOKEN: ${{ inputs.token }}
RF_BACKGROUND: ${{ inputs.background }}
RF_DRY_RUN: ${{ inputs.dry_run }}
RF_CACHE_KEY: ${{ inputs.cache_key }}
run: ${GITHUB_ACTION_PATH}/steps/validate.sh
- name: Run Rainforest
uses: docker://gcr.io/rf-public-images/rainforest-cli:latest
if: (! inputs.dry_run)
env:
GH_ACTION_VERSION: ${{ env.RF_ACTION_VERSION }}
with:
args: ${{ steps.validate.outputs.command }}
- name: Archive Rainforest results
uses: actions/upload-artifact@v4
if: (! inputs.dry_run) && steps.validate.outputs.command && always()
with:
name: Test Results
path: results/rainforest/junit.xml
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: (! inputs.dry_run) && steps.validate.outputs.command && always()
with:
check_name: Rainforest Results
report_paths: results/rainforest/junit.xml