-
Notifications
You must be signed in to change notification settings - Fork 204
200 lines (173 loc) · 6.11 KB
/
e2e-mobile-tests.yml
File metadata and controls
200 lines (173 loc) · 6.11 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
name: E2E Mobile Tests
on:
# Weekly schedule - Monday 9am UTC
schedule:
- cron: '0 9 * * 1'
# TODO: Remove before merging - for testing only
push:
branches:
- feat/mobile-devtools-e2e-integration
# Manual trigger
workflow_dispatch:
inputs:
test_matrix:
description: 'Test matrix to run'
required: false
type: choice
options:
- all
- android
- ios
- compat
- latest
default: 'all'
# Callable by other workflows (e.g., release)
workflow_call:
concurrency:
group: e2e-mobile-${{ github.ref }}
cancel-in-progress: true
jobs:
e2e-android-compat:
name: E2E Android (RN 0.72)
runs-on: ubuntu-24.04
timeout-minutes: 30
if: |
inputs.test_matrix == 'all' ||
inputs.test_matrix == 'android' ||
inputs.test_matrix == 'compat' ||
github.event_name != 'workflow_dispatch'
steps:
- uses: actions/checkout@v6
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.15.0
with:
project-path: examples/E2E-compat
- name: Run Android E2E Tests
working-directory: examples/E2E-compat
run: devbox run --pure test:e2e:android
env:
DETOX_AVD: medium_phone_API33_x86_64
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: e2e-android-compat-results
path: examples/E2E-compat/reports/
if-no-files-found: ignore
e2e-ios-compat:
name: E2E iOS (RN 0.72)
runs-on: macos-14
timeout-minutes: 30
if: |
inputs.test_matrix == 'all' ||
inputs.test_matrix == 'ios' ||
inputs.test_matrix == 'compat' ||
github.event_name != 'workflow_dispatch'
steps:
- uses: actions/checkout@v6
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.15.0
with:
project-path: examples/E2E-compat
- name: Run iOS E2E Tests
working-directory: examples/E2E-compat
run: devbox run --pure test:e2e:ios
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: e2e-ios-compat-results
path: examples/E2E-compat/reports/
if-no-files-found: ignore
e2e-android-latest:
name: E2E Android (RN 0.84)
runs-on: ubuntu-24.04
timeout-minutes: 30
continue-on-error: true # TODO: Remove when RN 0.84 support is complete
if: |
inputs.test_matrix == 'all' ||
inputs.test_matrix == 'android' ||
inputs.test_matrix == 'latest' ||
github.event_name != 'workflow_dispatch'
steps:
- uses: actions/checkout@v6
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.15.0
with:
project-path: examples/E2E-latest
- name: Run Android E2E Tests
working-directory: examples/E2E-latest
run: devbox run --pure test:e2e:android
env:
DETOX_AVD: medium_phone_API35_x86_64
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: e2e-android-latest-results
path: examples/E2E-latest/reports/
if-no-files-found: ignore
e2e-ios-latest:
name: E2E iOS (RN 0.84)
runs-on: macos-14
timeout-minutes: 30
continue-on-error: true # TODO: Remove when RN 0.84 support is complete
if: |
inputs.test_matrix == 'all' ||
inputs.test_matrix == 'ios' ||
inputs.test_matrix == 'latest' ||
github.event_name != 'workflow_dispatch'
steps:
- uses: actions/checkout@v6
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.15.0
with:
project-path: examples/E2E-latest
- name: Run iOS E2E Tests
working-directory: examples/E2E-latest
run: devbox run --pure test:e2e:ios
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: e2e-ios-latest-results
path: examples/E2E-latest/reports/
if-no-files-found: ignore
e2e-summary:
name: E2E Test Summary
runs-on: ubuntu-latest
needs:
[e2e-android-compat, e2e-ios-compat, e2e-android-latest, e2e-ios-latest]
if: always()
steps:
- name: Check results
run: |
echo "📊 E2E Test Results:"
echo " Android (RN 0.72): ${{ needs.e2e-android-compat.result }}"
echo " iOS (RN 0.72): ${{ needs.e2e-ios-compat.result }}"
echo " Android (RN 0.84): ${{ needs.e2e-android-latest.result }}"
echo " iOS (RN 0.84): ${{ needs.e2e-ios-latest.result }}"
echo ""
# Check for failures, treating continue-on-error jobs as non-blocking
if [[ "${{ needs.e2e-android-compat.result }}" != "success" && "${{ needs.e2e-android-compat.result }}" != "skipped" ]] || \
[[ "${{ needs.e2e-ios-compat.result }}" != "success" && "${{ needs.e2e-ios-compat.result }}" != "skipped" ]]; then
echo "::error::One or more E2E test suites failed"
echo "::error::Check the individual job logs for details"
exit 1
fi
# Note: android-latest and ios-latest have continue-on-error, so we don't fail on them
if [[ "${{ needs.e2e-android-latest.result }}" == "failure" ]] || \
[[ "${{ needs.e2e-ios-latest.result }}" == "failure" ]]; then
echo "::warning::RN 0.84 tests failed but are allowed to fail (continue-on-error)"
fi
echo "::notice::✅ E2E tests passed successfully!"