This repository has been archived by the owner on Feb 25, 2024. It is now read-only.
forked from bitrise-steplib/steps-avd-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitrise.yml
executable file
·129 lines (115 loc) · 2.42 KB
/
bitrise.yml
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
format_version: 9
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
workflows:
test:
before_run:
- audit-this-step
after_run:
- screenshots
steps:
- go-list:
- golint:
- errcheck:
- go-test:
screenshots:
before_run:
- _in-deploy-dir
after_run:
- _avd-29-scr
- _avd-28-scr
- _avd-27-scr
- _avd-26-scr
- _avd-25-scr
- _avd-24-scr
- _avd-23-scr
_avd-23-scr:
envs:
- EMU_VER: 23
after_run:
- _take_screenshot
_avd-24-scr:
envs:
- EMU_VER: 24
after_run:
- _take_screenshot
_avd-25-scr:
envs:
- EMU_VER: 25
after_run:
- _take_screenshot
_avd-26-scr:
envs:
- EMU_VER: 26
after_run:
- _take_screenshot
_avd-27-scr:
envs:
- EMU_VER: 27
after_run:
- _take_screenshot
_avd-28-scr:
envs:
- EMU_VER: 28
after_run:
- _take_screenshot
_avd-29-scr:
envs:
- EMU_VER: 29
after_run:
- _take_screenshot
_in-deploy-dir:
steps:
- change-workdir:
inputs:
- path: $BITRISE_DEPLOY_DIR
_start-emulator:
steps:
- path::./:
title: Step Test
inputs:
- api_level: $EMU_VER
- tag: "default"
- script:
inputs:
- content: |
#!/bin/bash
set -ex
if [ "$BITRISE_EMULATOR_SERIAL" = "emulator-5554" ]
then
exit 0
else
exit 1
fi
- wait-for-android-emulator: {}
_take_screenshot:
before_run:
- _start-emulator
after_run:
- _kill-emulator
steps:
- script:
inputs:
- content: |
#!/bin/bash
sleep 15
$ANDROID_HOME/platform-tools/adb shell "screencap -p /sdcard/screen.png"
$ANDROID_HOME/platform-tools/adb pull "/sdcard/screen.png" "./screen_$EMU_VER.png"
_kill-emulator:
steps:
- script:
is_always_run: true
inputs:
- content: |
#!/bin/bash
set -x
adb -s $BITRISE_EMULATOR_SERIAL emu kill
# ----------------------------------------------------------------
# --- workflows to Share this step into a Step Library
audit-this-step:
steps:
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
stepman audit --step-yml ./step.yml