forked from Smartdevs17/SubTrackr
-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (134 loc) · 4.6 KB
/
Copy pathe2e-detox.yml
File metadata and controls
137 lines (134 loc) · 4.6 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
name: E2E Detox Tests
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
test-ios:
name: Detox iOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci --legacy-peer-deps || npm install --legacy-peer-deps
- name: Expo Prebuild
run: APP_ENV=production npx expo prebuild -p ios
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
- name: Install CocoaPods dependencies
run: cd ios && pod install --repo-update
- name: Install AppleSimulatorUtils
run: brew tap wix/brew && brew install applesimutils
- name: Build Detox iOS
run: npm run e2e:build-ios
- name: Test Detox iOS — core lifecycle
run: npm run e2e:test-ios -- --testPathPattern="subscription\\.test|payment\\.test|launch\\.test"
env:
E2E_MAX_WORKERS: 1
- name: Test Detox iOS — full lifecycle suite (Issue #440)
# Retry once on failure to reduce flakiness from simulator cold-start
run: |
npm run e2e:test-ios -- --testPathPattern="subscription-lifecycle\\.test" || \
npm run e2e:test-ios -- --testPathPattern="subscription-lifecycle\\.test"
env:
E2E_MAX_WORKERS: 1
- name: Test Detox iOS — visual regression
run: |
npm run e2e:test-ios -- --testPathPattern="visual-regression\\.test" || \
npm run e2e:test-ios -- --testPathPattern="visual-regression\\.test"
env:
E2E_MAX_WORKERS: 1
- name: Upload iOS visual artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-ios-visual-artifacts
path: |
artifacts/
e2e/fixtures/visual-baselines.json
retention-days: 14
- name: Upload E2E artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-ios-artifacts
path: artifacts/
retention-days: 7
test-android:
name: Detox Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci --legacy-peer-deps || npm install --legacy-peer-deps
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Expo Prebuild
run: APP_ENV=production npx expo prebuild -p android
- name: Build Detox Android
run: npm run e2e:build-android
- name: Detox Android — core lifecycle
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
target: default
arch: x86_64
profile: pixel_4
script: npm run e2e:test-android -- --testPathPattern="subscription\\.test|payment\\.test|launch\\.test"
env:
E2E_MAX_WORKERS: 1
- name: Detox Android — full lifecycle suite (Issue #440)
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
target: default
arch: x86_64
profile: pixel_4
# Retry once on failure to reduce flakiness from emulator cold-start
script: |
npm run e2e:test-android -- --testPathPattern="subscription-lifecycle\\.test" || \
npm run e2e:test-android -- --testPathPattern="subscription-lifecycle\\.test"
env:
E2E_MAX_WORKERS: 1
- name: Detox Android — visual regression
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
target: default
arch: x86_64
profile: pixel_4
script: |
npm run e2e:test-android -- --testPathPattern="visual-regression\\.test" || \
npm run e2e:test-android -- --testPathPattern="visual-regression\\.test"
env:
E2E_MAX_WORKERS: 1
- name: Upload Android visual artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-android-visual-artifacts
path: |
artifacts/
e2e/fixtures/visual-baselines.json
retention-days: 14
- name: Upload E2E artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-android-artifacts
path: artifacts/
retention-days: 7