-
Notifications
You must be signed in to change notification settings - Fork 4
220 lines (201 loc) · 10.5 KB
/
github-actions-tests.yml
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
name: GitHub Actions integration tests
on:
workflow_call:
permissions:
id-token: write
contents: read
jobs:
get:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: ./.github/actions/setup
- id: run
run: npm run release get-installer-url
outputs:
installer-url: ${{ steps.run.outputs.installer-url }}
web-test-run:
needs: [get]
runs-on: ubuntu-latest
env:
AUTIFY_CLI_INTEGRATION_TEST_INSTALL: 1
AUTIFY_TEST_WAIT_INTERVAL_SECOND: 0
AUTIFY_CONNECT_CLIENT_MODE: fake
steps:
- uses: actions/setup-node@v4
- id: web-test-run
uses: autifyhq/actions-web-test-run@v2
with:
access-token: token
autify-path: autify-with-proxy
autify-cli-installer-url: ${{ needs.get.outputs.installer-url }}
autify-test-url: https://app.autify.com/projects/0000/scenarios/0000
- run: test "${{ steps.web-test-run.outputs.exit-code }}" = 0
- run: echo "${{ steps.web-test-run.outputs.log }}" | grep "Successfully started"
- run: echo "${{ steps.web-test-run.outputs.result-url }}" | grep -E 'https://app.autify.com/projects/[[:digit:]]+/'
- id: web-test-run-wait
uses: autifyhq/actions-web-test-run@v2
with:
access-token: token
autify-path: autify-with-proxy
autify-cli-installer-url: ${{ needs.get.outputs.installer-url }}
autify-test-url: https://app.autify.com/projects/0000/scenarios/0000
wait: true
- run: test "${{ steps.web-test-run-wait.outputs.exit-code }}" = 0
- run: echo "${{ steps.web-test-run-wait.outputs.log }}" | grep "Test passed!"
- run: echo "${{ steps.web-test-run-wait.outputs.result-url }}" | grep -E 'https://app.autify.com/projects/[[:digit:]]+/'
- id: web-test-run-wait-autify-connect-client
uses: autifyhq/actions-web-test-run@v2
with:
access-token: token
autify-path: autify-with-proxy
autify-cli-installer-url: ${{ needs.get.outputs.installer-url }}
autify-test-url: https://app.autify.com/projects/0000/scenarios/0000
wait: true
autify-connect-client: true
- run: test "${{ steps.web-test-run-wait-autify-connect-client.outputs.exit-code }}" = 0
- run: echo "${{ steps.web-test-run-wait-autify-connect-client.outputs.log }}" | grep "Autify Connect Client is ready!"
- run: echo "${{ steps.web-test-run-wait-autify-connect-client.outputs.log }}" | grep "Test passed!"
- run: echo "${{ steps.web-test-run-wait-autify-connect-client.outputs.result-url }}" | grep -E 'https://app.autify.com/projects/[[:digit:]]+/'
- id: web-test-run-url-replacements
uses: autifyhq/actions-web-test-run@v2
with:
access-token: token
autify-path: autify-with-proxy
autify-cli-installer-url: ${{ needs.get.outputs.installer-url }}
autify-test-url: https://app.autify.com/projects/0000/scenarios/0000
url-replacements: https://example.com https://example.net?foo=bar
- run: |
echo "${{ steps.web-test-run-url-replacements.outputs.log }}" | grep "Using URL replacements: https://example.com => https://example.net?foo=bar"
- id: web-test-run-url-replacements-deprecated
uses: autifyhq/actions-web-test-run@v2
with:
access-token: token
autify-path: autify-with-proxy
autify-cli-installer-url: ${{ needs.get.outputs.installer-url }}
autify-test-url: https://app.autify.com/projects/0000/scenarios/0000
url-replacements: https://example.com=https://example.net?foo=bar
- run: |
echo "${{ steps.web-test-run-url-replacements.outputs.log }}" | grep "Using URL replacements: https://example.com => https://example.net?foo=bar"
mobile-test-run:
needs: [get]
runs-on: ubuntu-latest
env:
AUTIFY_CLI_INTEGRATION_TEST_INSTALL: 1
AUTIFY_TEST_WAIT_INTERVAL_SECOND: 0
steps:
- uses: actions/setup-node@v4
- id: mobile-test-run
uses: autifyhq/actions-mobile-test-run@v2
with:
access-token: token
autify-path: autify-with-proxy
autify-cli-installer-url: ${{ needs.get.outputs.installer-url }}
autify-test-url: https://mobile-app.autify.com/projects/AAA/test_plans/BBB
build-id: CCC
- run: test ${{ steps.mobile-test-run.outputs.exit-code }} = 0
- run: echo "${{ steps.mobile-test-run.outputs.log }}" | grep "Successfully started"
- run: test -n "${{ steps.mobile-test-run.outputs.build-id }}"
- run: echo ${{ steps.mobile-test-run.outputs.result-url }} | grep -E 'https://mobile-app.autify.com/projects/[^/]+/results/[^/]+'
- id: mobile-test-run-wait
uses: autifyhq/actions-mobile-test-run@v2
with:
access-token: token
autify-path: autify-with-proxy
autify-cli-installer-url: ${{ needs.get.outputs.installer-url }}
autify-test-url: https://mobile-app.autify.com/projects/AAA/test_plans/BBB
build-id: CCC
wait: true
- run: test ${{ steps.mobile-test-run-wait.outputs.exit-code }} = 0
- run: echo "${{ steps.mobile-test-run-wait.outputs.log }}" | grep "Successfully started"
- run: echo "${{ steps.mobile-test-run-wait.outputs.log }}" | grep "Test passed!"
- run: test -n "${{ steps.mobile-test-run-wait.outputs.build-id }}"
- run: echo ${{ steps.mobile-test-run-wait.outputs.result-url }} | grep -E 'https://mobile-app.autify.com/projects/[^/]+/results/[^/]+'
- id: mobile-test-run-android
uses: autifyhq/actions-mobile-test-run@v2
with:
access-token: token
autify-path: autify-with-proxy
autify-cli-installer-url: ${{ needs.get.outputs.installer-url }}
autify-test-url: https://mobile-app.autify.com/projects/AAA/test_plans/BBB
build-path: ./android.apk
- run: test ${{ steps.mobile-test-run-android.outputs.exit-code }} = 0
- run: echo "${{ steps.mobile-test-run-android.outputs.log }}" | grep "Successfully uploaded"
- run: echo "${{ steps.mobile-test-run-android.outputs.log }}" | grep "Successfully started"
- run: test -n "${{ steps.mobile-test-run-android.outputs.build-id }}"
- run: echo ${{ steps.mobile-test-run-android.outputs.result-url }} | grep -E 'https://mobile-app.autify.com/projects/[^/]+/results/[^/]+'
- id: mobile-test-run-android-wait
uses: autifyhq/actions-mobile-test-run@v2
with:
access-token: token
autify-path: autify-with-proxy
autify-cli-installer-url: ${{ needs.get.outputs.installer-url }}
autify-test-url: https://mobile-app.autify.com/projects/AAA/test_plans/BBB
build-path: ./android.apk
wait: true
- run: test ${{ steps.mobile-test-run-android-wait.outputs.exit-code }} = 0
- run: echo "${{ steps.mobile-test-run-android-wait.outputs.log }}" | grep "Successfully uploaded"
- run: echo "${{ steps.mobile-test-run-android-wait.outputs.log }}" | grep "Successfully started"
- run: echo "${{ steps.mobile-test-run-android-wait.outputs.log }}" | grep "Test passed!"
- run: test -n "${{ steps.mobile-test-run-android-wait.outputs.build-id }}"
- run: echo ${{ steps.mobile-test-run-android-wait.outputs.result-url }} | grep -E 'https://mobile-app.autify.com/projects/[^/]+/results/[^/]+'
- id: mobile-test-run-ios
uses: autifyhq/actions-mobile-test-run@v2
with:
access-token: token
autify-path: autify-with-proxy
autify-cli-installer-url: ${{ needs.get.outputs.installer-url }}
autify-test-url: https://mobile-app.autify.com/projects/AAA/test_plans/BBB
build-path: ./ios.app
- run: test ${{ steps.mobile-test-run-ios.outputs.exit-code }} = 0
- run: echo "${{ steps.mobile-test-run-ios.outputs.log }}" | grep "Successfully uploaded"
- run: echo "${{ steps.mobile-test-run-ios.outputs.log }}" | grep "Successfully started"
- run: test -n "${{ steps.mobile-test-run-ios.outputs.build-id }}"
- run: echo ${{ steps.mobile-test-run-ios.outputs.result-url }} | grep -E 'https://mobile-app.autify.com/projects/[^/]+/results/[^/]+'
- id: mobile-test-run-ios-wait
uses: autifyhq/actions-mobile-test-run@v2
with:
access-token: token
autify-path: autify-with-proxy
autify-cli-installer-url: ${{ needs.get.outputs.installer-url }}
autify-test-url: https://mobile-app.autify.com/projects/AAA/test_plans/BBB
build-path: ./ios.app
wait: true
- run: test ${{ steps.mobile-test-run-ios-wait.outputs.exit-code }} = 0
- run: echo "${{ steps.mobile-test-run-ios-wait.outputs.log }}" | grep "Successfully uploaded"
- run: echo "${{ steps.mobile-test-run-ios-wait.outputs.log }}" | grep "Successfully started"
- run: echo "${{ steps.mobile-test-run-ios-wait.outputs.log }}" | grep "Test passed!"
- run: test -n "${{ steps.mobile-test-run-ios-wait.outputs.build-id }}"
- run: echo ${{ steps.mobile-test-run-ios-wait.outputs.result-url }} | grep -E 'https://mobile-app.autify.com/projects/[^/]+/results/[^/]+'
mobile-build-upload:
needs: [get]
runs-on: ubuntu-latest
env:
AUTIFY_CLI_INTEGRATION_TEST_INSTALL: 1
AUTIFY_TEST_WAIT_INTERVAL_SECOND: 0
steps:
- uses: actions/setup-node@v4
- id: mobile-build-upload-ios
uses: autifyhq/actions-mobile-build-upload@v2
with:
access-token: token
autify-path: autify-with-proxy
autify-cli-installer-url: ${{ needs.get.outputs.installer-url }}
workspace-id: AAA
build-path: ./ios.app
- run: test ${{ steps.mobile-build-upload-ios.outputs.exit-code }} = 0
- run: echo "${{ steps.mobile-build-upload-ios.outputs.log }}" | grep "Successfully uploaded"
- run: test -n ${{ steps.mobile-build-upload-ios.outputs.build-id }}
- id: mobile-build-upload-android
uses: autifyhq/actions-mobile-build-upload@v2
with:
access-token: token
autify-path: autify-with-proxy
autify-cli-installer-url: ${{ needs.get.outputs.installer-url }}
workspace-id: AAA
build-path: ./android.apk
- run: test ${{ steps.mobile-build-upload-android.outputs.exit-code }} = 0
- run: echo "${{ steps.mobile-build-upload-android.outputs.log }}" | grep "Successfully uploaded"
- run: test -n ${{ steps.mobile-build-upload-android.outputs.build-id }}