-
-
Notifications
You must be signed in to change notification settings - Fork 456
159 lines (152 loc) · 5.13 KB
/
test.yml
File metadata and controls
159 lines (152 loc) · 5.13 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
name: Test
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
analyse_js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: corepack enable
- uses: actions/setup-node@v6
with:
node-version: lts/*
cache: yarn
- run: yarn install --immutable
- name: Run ESLint
run: yarn lint
- name: Jest
run: yarn test
e2e_release_ios:
runs-on: macos-26
env:
DEVELOPER_DIR: /Applications/Xcode_26.3.app/Contents/Developer
steps:
- uses: actions/checkout@v6
- name: Boot iPhone 17 Pro Max simulator
run: |
DEVICE_ID=$(xcrun simctl list devices available -j | jq -r '.devices | to_entries[] | .value[] | select(.name == "iPhone 17 Pro Max") | .udid' | head -1)
xcrun simctl boot "$DEVICE_ID"
- name: Install applesimutils
run: |
HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
- run: corepack enable
- uses: actions/setup-node@v6
with:
node-version: lts/*
cache: yarn
- run: yarn install --immutable
- name: Bundle JS
run: yarn bundle:ios
- uses: actions/cache@v5
with:
path: example/ios/Pods
key: pods-${{ runner.os }}-${{ hashFiles('example/ios/Podfile.lock') }}
- name: Pod install
run: cd example && RCT_NEW_ARCH_ENABLED=0 npx pod-install
- name: Build app for e2e tests
run: yarn detox:ios:build:release
- name: Run e2e tests
run: yarn detox:ios:test:release
- uses: actions/upload-artifact@v7
if: failure()
with:
name: ios-e2e-artifacts
path: artifacts
retention-days: 14
new_arch_ios_build_only:
runs-on: macos-26
env:
DEVELOPER_DIR: /Applications/Xcode_26.3.app/Contents/Developer
steps:
- uses: actions/checkout@v6
- run: corepack enable
- uses: actions/setup-node@v6
with:
node-version: lts/*
cache: yarn
- run: yarn install --immutable
- uses: actions/cache@v5
with:
path: example/ios/Pods
key: pods-newarch-${{ runner.os }}-${{ hashFiles('example/ios/Podfile.lock') }}
- name: Pod install (new arch)
run: cd example && RCT_NEW_ARCH_ENABLED=1 RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 npx pod-install
- name: Build app with new arch
run: yarn detox:ios:build:release
e2e_release_android:
runs-on: ubuntu-latest
env:
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx4g -XX:+HeapDumpOnOutOfMemoryError" -Dorg.gradle.daemon=false'
steps:
- uses: actions/checkout@v6
- run: corepack enable
- uses: actions/setup-node@v6
with:
node-version: lts/*
cache: yarn
- uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 17
- uses: actions/cache@v5
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
- run: yarn install --immutable
- name: Bundle JS
run: yarn bundle:android
- run: yarn generateManifest
- name: Build app for e2e tests
run: ORG_GRADLE_PROJECT_newArchEnabled=false yarn detox:android:build:release
- 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: Run e2e tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
avd-name: TestingAVD
disable-animations: true
script: yarn detox:android:test:release
- uses: actions/upload-artifact@v7
if: failure()
with:
name: android-e2e-artifacts
path: artifacts
retention-days: 14
new_arch_android_build_only:
runs-on: ubuntu-latest
env:
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx4g -XX:+HeapDumpOnOutOfMemoryError" -Dorg.gradle.daemon=false'
steps:
- uses: actions/checkout@v6
- run: corepack enable
- uses: actions/setup-node@v6
with:
node-version: lts/*
cache: yarn
- uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 17
- uses: actions/cache@v5
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
- run: yarn install --immutable
- name: Bundle JS
run: yarn bundle:android
- run: yarn generateManifest
- name: Build app with new arch
run: ORG_GRADLE_PROJECT_newArchEnabled=true yarn detox:android:build:release