forked from MetaMask/metamask-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-e2e-smoke-tests-android.yml
More file actions
243 lines (221 loc) · 7.06 KB
/
run-e2e-smoke-tests-android.yml
File metadata and controls
243 lines (221 loc) · 7.06 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
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
name: Android E2E Smoke Tests
on:
workflow_call:
inputs:
changed_files:
description: 'Changed files'
required: false
type: string
default: ''
permissions:
contents: read
id-token: write
jobs:
trade-android-smoke:
strategy:
matrix:
split: [1]
fail-fast: false
uses: ./.github/workflows/run-e2e-workflow.yml
with:
test-suite-name: trade-android-smoke-${{ matrix.split }}
platform: android
test_suite_tag: 'SmokeTrade'
split_number: ${{ matrix.split }}
total_splits: 1
changed_files: ${{ inputs.changed_files }}
secrets: inherit
perps-android-smoke:
strategy:
matrix:
split: [1]
fail-fast: false
uses: ./.github/workflows/run-e2e-workflow.yml
with:
test-suite-name: perps-android-smoke-${{ matrix.split }}
platform: android
test_suite_tag: 'SmokePerps'
split_number: ${{ matrix.split }}
total_splits: 1
changed_files: ${{ inputs.changed_files }}
secrets: inherit
wallet-platform-android-smoke:
strategy:
matrix:
split: [1, 2]
fail-fast: false
uses: ./.github/workflows/run-e2e-workflow.yml
with:
test-suite-name: wallet-platform-android-smoke-${{ matrix.split }}
platform: android
test_suite_tag: 'SmokeWalletPlatform'
split_number: ${{ matrix.split }}
total_splits: 2
changed_files: ${{ inputs.changed_files }}
secrets: inherit
identity-android-smoke:
strategy:
matrix:
split: [1, 2]
fail-fast: false
uses: ./.github/workflows/run-e2e-workflow.yml
with:
test-suite-name: identity-android-smoke-${{ matrix.split }}
platform: android
test_suite_tag: 'SmokeIdentity'
split_number: ${{ matrix.split }}
total_splits: 2
changed_files: ${{ inputs.changed_files }}
secrets: inherit
accounts-android-smoke:
strategy:
matrix:
split: [1]
fail-fast: false
uses: ./.github/workflows/run-e2e-workflow.yml
with:
test-suite-name: accounts-android-smoke-${{ matrix.split }}
platform: android
test_suite_tag: 'SmokeAccounts'
split_number: ${{ matrix.split }}
total_splits: 1
changed_files: ${{ inputs.changed_files }}
secrets: inherit
network-abstraction-android-smoke:
strategy:
matrix:
split: [1, 2]
fail-fast: false
uses: ./.github/workflows/run-e2e-workflow.yml
with:
test-suite-name: network-abstraction-android-smoke-${{ matrix.split }}
platform: android
test_suite_tag: 'SmokeNetworkAbstractions'
split_number: ${{ matrix.split }}
total_splits: 2
changed_files: ${{ inputs.changed_files }}
secrets: inherit
network-expansion-android-smoke:
strategy:
matrix:
split: [1, 2]
fail-fast: false
uses: ./.github/workflows/run-e2e-workflow.yml
with:
test-suite-name: network-expansion-android-smoke-${{ matrix.split }}
platform: android
test_suite_tag: 'SmokeNetworkExpansion'
split_number: ${{ matrix.split }}
total_splits: 2
changed_files: ${{ inputs.changed_files }}
secrets: inherit
confirmations-redesigned-android-smoke:
strategy:
matrix:
split: [1, 2, 3]
fail-fast: false
uses: ./.github/workflows/run-e2e-workflow.yml
with:
test-suite-name: confirmations-redesigned-android-smoke-${{ matrix.split }}
platform: android
test_suite_tag: 'SmokeConfirmationsRedesigned'
split_number: ${{ matrix.split }}
total_splits: 3
changed_files: ${{ inputs.changed_files }}
secrets: inherit
# prediction-market-android-smoke:
# strategy:
# matrix:
# split: [1]
# fail-fast: false
# uses: ./.github/workflows/run-e2e-workflow.yml
# with:
# test-suite-name: prediction_market_android_smoke-${{ matrix.split }}
# platform: android
# test_suite_tag: 'SmokePredictions'
# split_number: ${{ matrix.split }}
# total_splits: 1
# changed_files: ${{ inputs.changed_files }}
# secrets: inherit
rewards-android-smoke:
strategy:
matrix:
split: [1]
fail-fast: false
uses: ./.github/workflows/run-e2e-workflow.yml
with:
test-suite-name: rewards-android-smoke-${{ matrix.split }}
platform: android
test_suite_tag: 'SmokeRewards'
split_number: ${{ matrix.split }}
total_splits: 1
changed_files: ${{ inputs.changed_files }}
secrets: inherit
report-android-smoke-tests:
name: Report Android Smoke Tests
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
needs:
- trade-android-smoke
- perps-android-smoke
- wallet-platform-android-smoke
- identity-android-smoke
- accounts-android-smoke
- network-abstraction-android-smoke
- network-expansion-android-smoke
- confirmations-redesigned-android-smoke
# - prediction-market-android-smoke
- rewards-android-smoke
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Download shards test artifacts (XMLs + Screenshots)
uses: actions/download-artifact@v4
continue-on-error: true
with:
path: all-test-artifacts/
pattern: 'test-e2e-*-android-*'
- name: Post Test Report
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3
with:
name: 'Android E2E Smoke Test Results'
path: 'all-test-artifacts/**/junit.xml'
reporter: 'jest-junit'
fail-on-error: false
list-suites: 'failed'
list-tests: 'failed'
- name: Upload all test artifacts (XMLs + Screenshots)
uses: actions/upload-artifact@v4
with:
name: e2e-smoke-android-all-test-artifacts
path: all-test-artifacts/
- name: Create mobile JSON test report
id: create-json-report
continue-on-error: true
run: |
# Create a temporary directory for xml2js to avoid conflicts
mkdir -p temp-deps && cd temp-deps
npm init -y
npm install xml2js@0.5.0 --no-audit --no-fund
# Copy node_modules to workspace
cp -r node_modules ${{ github.workspace }}/
# Run the mobile test report generator
cd ${{ github.workspace }}
TEST_RESULTS_PATH=all-test-artifacts \
TEST_RUNS_PATH=test/test-results/test-runs-android.json \
RUN_ID=${{ github.run_id }} \
PR_NUMBER=${{ github.event.pull_request.number || '0' }} \
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
node .github/scripts/e2e-create-json-test-report.mjs
# Clean up temporary node_modules
rm -rf node_modules
- name: Upload JSON test report
if: steps.create-json-report.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: test-e2e-android-json-report
path: test/test-results/test-runs-android.json