-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathFastfile
59 lines (54 loc) · 1.84 KB
/
Fastfile
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
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:android)
platform :android do
desc 'Run unit tests using the mango plugin'
lane :example do
run_dockerized_task(
container_name: "emulator_#{options[:port_factor]}",
port_factor: options[:port_factor],
docker_image: 'joesss/mango-base:latest',
android_task: './gradlew testDebug',
post_actions: 'adb logcat -d > logcat.txt',
bundle_install: true,
core_amount: '8',
workspace_dir: '/root/tests/espresso-tests',
docker_registry_login: "docker login -u='USER' -p='PASS' some.docker.com",
pull_latest_image: true,
pre_action: 'echo $GIT_BRANCH > /root/.branch',
vnc_enabled: false,
environment_variables: options[:environment_variables] ? options[:environment_variables].split(' ') : ''
)
end
lane :unit_tests do
run_dockerized_task(
docker_image: 'joesss/mango-base:latest',
android_task: './gradlew testDebug',
is_running_on_emulator: false,
pull_latest_image: true,
pre_action: 'yes | sdkmanager --licenses && yes | sdkmanager --update'
)
end
desc 'Run espresso tests on docker images'
lane :espresso_tests do
run_dockerized_task(
container_name: 'espresso_container',
docker_image: 'joesss/mango-docker:latest',
container_timeout: 120,
android_task: './gradlew connectedAndroidTest',
post_actions: 'adb logcat -d > logcat.txt',
pull_latest_image: true
)
end
end