-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (62 loc) · 2.46 KB
/
Makefile
File metadata and controls
77 lines (62 loc) · 2.46 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
.PHONY: setup start start-fresh android ios test test-only e2e-build-android e2e-build-ios e2e-android e2e-android-only e2e-ios e2e-ios-only lint lint-full adb emulator
ENV_FILE ?= .env
# import and export env variables
ifneq (,$(wildcard ${ENV_FILE}))
include ${ENV_FILE}
export
endif
setup:
@clear && yarn install
start:
@clear && yarn start --reset-cache --client-logs
start-fresh:
@cd android && ./gradlew clean && ./gradlew --stop
@rm -rf node_modules/ ~/.gradle/caches/ android/app/.cxx android/app/build android/build
@yarn cache clean
@$(MAKE) setup start
android:
@clear && yarn android
@$(MAKE) adb
ios:
@clear && yarn ios
test:
@clear && APP_ENV=test yarn test
# You need to add 'testonly' to the test title/description, like:
# it('testonly: should do something', () => { ... })
test-only:
@clear && APP_ENV=test yarn test -t testonly --silent=false
e2e-build-android:
@APP_ENV=test detox build -c android.emu.debug
e2e-build-ios:
@APP_ENV=test detox build -c ios.sim.debug
e2e-android: ANDROID_SDK_ROOT?=~/Android/Sdk
e2e-android:
@clear && ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT} APP_ENV=test detox test -c android.emu.debug --retries 0
# You can set the `TESTFILE` env var when running the target, like:
# make e2e-android-only TESTFILE=foodtech/checkout/customer__role_user__logged_in/success__payment__cash_on_delivery.spec.js
# Or just change here the `TESTFILE` env var to run the desired test
e2e-android-only: TESTFILE?=dispatch/success__report_task_incident.spec.js
e2e-android-only: ANDROID_SDK_ROOT?=~/Android/Sdk
e2e-android-only:
@clear && ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT} APP_ENV=test detox test ./e2e/${TESTFILE} -c android.emu.debug --retries 0
e2e-ios:
@clear && APP_ENV=test detox test -c ios.sim.debug --retries 0
# You can set the `TESTFILE` env var when running the target, like:
# make e2e-ios-only TESTFILE=foodtech/checkout/customer__role_user__logged_in/success__payment__cash_on_delivery.spec.js
# Or just change here the `TESTFILE` env var to run the desired test
e2e-ios-only: TESTFILE?=02_courier.spec.js
e2e-ios-only:
@clear && APP_ENV=test detox test ./e2e/${TESTFILE} -c ios.sim.debug --retries 0
lint:
@clear && yarn lint --quiet
lint-full:
@clear && yarn lint
adb:
@adb reverse tcp:9090 tcp:9090
android-dark-mode:
@adb shell "cmd uimode night yes"
android-light-mode:
@adb shell "cmd uimode night no"
emulator: ANDROID_SDK_ROOT?=~/Android/Sdk
emulator:
@clear && ${ANDROID_SDK_ROOT}/emulator/emulator -avd Pixel_6_API_35