forked from LedgerHQ/ledger-live
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdetox.config.js
99 lines (98 loc) · 3.57 KB
/
detox.config.js
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
const iosArch = "arm64";
// NOTE: Pass CI=1 if you want to build locally when you don't have a mac M1. This works better if you do export CI=1 for the whole session.
const androidArch = process.env.CI ? "x86_64" : "arm64-v8a";
/** @type {Detox.DetoxConfig} */
module.exports = {
testRunner: {
$0: "ts-jest",
args: {
config: "e2e/jest.config.js",
},
jest: {
setupTimeout: 500000,
},
retries: 0,
},
logger: {
level: process.env.DEBUG_DETOX ? "trace" : "info",
},
behavior: {
// NOTE: https://github.com/wix/Detox/blob/master/docs/APIRef.Configuration.md#behavior-configuration
init: {
reinstallApp: true,
exposeGlobals: false,
},
launchApp: "auto",
cleanup: {
shutdownDevice: false,
},
},
apps: {
"ios.debug": {
type: "ios.app",
build: `export ENVFILE=.env.mock && xcodebuild ARCHS=${iosArch} ONLY_ACTIVE_ARCH=YES -workspace ios/ledgerlivemobile.xcworkspace -scheme ledgerlivemobile -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build`,
binaryPath: "ios/build/Build/Products/Debug-iphonesimulator/ledgerlivemobile.app",
},
"ios.staging": {
type: "ios.app",
build: `export ENVFILE=.env.mock && xcodebuild ARCHS=${iosArch} ONLY_ACTIVE_ARCH=YES -workspace ios/ledgerlivemobile.xcworkspace -scheme ledgerlivemobile -configuration Staging -sdk iphonesimulator -derivedDataPath ios/build`,
binaryPath: "ios/build/Build/Products/Staging-iphonesimulator/ledgerlivemobile.app",
},
"ios.release": {
type: "ios.app",
build: `export ENVFILE=.env.mock && xcodebuild ARCHS=${iosArch} ONLY_ACTIVE_ARCH=YES -workspace ios/ledgerlivemobile.xcworkspace -scheme ledgerlivemobile -configuration Release -sdk iphonesimulator -derivedDataPath ios/build`,
binaryPath: "ios/build/Build/Products/Release-iphonesimulator/ledgerlivemobile.app",
},
"android.debug": {
type: "android.apk",
build: `cd android && ENVFILE=.env.mock ./gradlew app:assembleDebug app:assembleAndroidTest -DtestBuildType=debug -PreactNativeArchitectures=${androidArch} && cd ..`,
binaryPath: `android/app/build/outputs/apk/debug/app-${androidArch}-debug.apk`,
testBinaryPath: "android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk",
},
"android.release": {
type: "android.apk",
build: `cd android && ENVFILE=.env.mock ./gradlew app:assembleDetox app:assembleAndroidTest -DtestBuildType=detox -PreactNativeArchitectures=${androidArch} && cd ..`,
binaryPath: `android/app/build/outputs/apk/detox/app-${androidArch}-detox.apk`,
testBinaryPath: "android/app/build/outputs/apk/androidTest/detox/app-detox-androidTest.apk",
},
},
devices: {
simulator: {
type: "ios.simulator",
device: {
type: "iPhone 14",
},
},
emulator: {
type: "android.emulator",
device: {
avdName: "Pixel_6_Pro_API_32",
},
gpuMode: "swiftshader_indirect",
headless: process.env.CI ? true : false,
},
},
configurations: {
"ios.sim.debug": {
device: "simulator",
app: "ios.debug",
// artifacts: { https://github.com/wix/Detox/blob/master/docs/APIRef.Configuration.md#artifacts-configuration },
},
"ios.sim.staging": {
device: "simulator",
app: "ios.staging",
},
"ios.sim.release": {
device: "simulator",
app: "ios.release",
},
"android.emu.debug": {
device: "emulator",
app: "android.debug",
},
"android.emu.release": {
device: "emulator",
app: "android.release",
},
},
};