-
-
Notifications
You must be signed in to change notification settings - Fork 455
129 lines (124 loc) · 4.09 KB
/
test.yml
File metadata and controls
129 lines (124 loc) · 4.09 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
name: Test
on:
push:
branches: [master]
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_ios:
runs-on: macos-26
strategy:
fail-fast: false
matrix:
include:
- arch: old
pod-env: 'RCT_NEW_ARCH_ENABLED=0'
- arch: new
pod-env: 'RCT_NEW_ARCH_ENABLED=1'
name: e2e_ios (${{ matrix.arch }} arch)
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-${{ matrix.arch }}-${{ runner.os }}-${{ hashFiles('example/ios/Podfile.lock') }}
- name: Pod install
run: cd example && ${{ matrix.pod-env }} RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 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-${{ matrix.arch }}-artifacts
path: artifacts
retention-days: 14
e2e_android:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- arch: old
new-arch-enabled: false
- arch: new
new-arch-enabled: true
name: e2e_android (${{ matrix.arch }} arch)
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=${{ matrix.new-arch-enabled }} 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-${{ matrix.arch }}-artifacts
path: artifacts
retention-days: 14