1
- format_version : 5
1
+ format_version : 7
2
2
default_step_lib_source : https://github.com/bitrise-io/bitrise-steplib.git
3
3
4
4
app :
5
5
envs :
6
- - BITRISE_STEP_GIT_CLONE_URL : https://github.com/bitrise-steplib/bitrise-step- android-unit -test.git
7
- - MY_STEPLIB_REPO_FORK_GIT_URL : $MY_STEPLIB_REPO_FORK_GIT_URL
8
- - SAMPLE_REPO_GIT_CLONE_URL : https://github.com/bitrise-samples/android-multiple-test-results-sample.git
6
+ - SAMPLE_REPO_GIT_CLONE_URL : https://github.com/bitrise-io/ android-multiple -test-results-sample .git
7
+ - SAMPLE_REPO_KOTLIN_GRADLE_URL : https://github.com/bitrise-io/android-gradle-kotlin-dsl.git
8
+ - ORIG_BITRISE_SOURCE_DIR : $BITRISE_SOURCE_DIR
9
9
10
10
workflows :
11
11
test :
@@ -15,19 +15,23 @@ workflows:
15
15
- go-tests
16
16
after_run :
17
17
- test-in-src-dir
18
+ - test-in-src-dir-module-variant
18
19
- test-in-root-tmp-dir
19
- - check-artifacts
20
+ - test-gradle-kts
20
21
- check-testaddon-export
21
22
22
23
test-in-src-dir :
23
24
title : Test android project & mono repo projects in source dir
24
25
steps :
26
+ - change-workdir :
27
+ title : cd $ORIG_BITRISE_SOURCE_DIR
28
+ inputs :
29
+ - path : $ORIG_BITRISE_SOURCE_DIR
25
30
- script :
26
31
inputs :
27
- - content : rm -rf _tmp
32
+ - content : rm -rf $ORIG_BITRISE_SOURCE_DIR/ _tmp
28
33
- change-workdir :
29
- title : cd $BITRISE_SOURCE_DIR/_tmp
30
- run_if : true
34
+ title : cd $ORIG_BITRISE_SOURCE_DIR/_tmp
31
35
inputs :
32
36
- path : ./_tmp
33
37
- is_create_path : true
@@ -38,12 +42,38 @@ workflows:
38
42
inputs :
39
43
- gradlew_path : ./gradlew
40
44
- path::./ :
41
- title : Test simple android project
45
+ title : Android Unit Test (monorepo projects in source dir)
46
+ after-run :
47
+ - check-artifacts
48
+
49
+ test-in-src-dir-module-variant :
50
+ title : Test mono repo projects in source dir, module and variant set
51
+ steps :
52
+ - change-workdir :
53
+ title : cd $ORIG_BITRISE_SOURCE_DIR
54
+ inputs :
55
+ - path : $ORIG_BITRISE_SOURCE_DIR
56
+ - script :
57
+ inputs :
58
+ - content : rm -rf $ORIG_BITRISE_SOURCE_DIR/_tmp
59
+ - change-workdir :
60
+ title : cd $ORIG_BITRISE_SOURCE_DIR/_tmp
61
+ inputs :
62
+ - path : ./_tmp
63
+ - is_create_path : true
64
+ - script :
65
+ inputs :
66
+ - content : git clone -b no-failures $SAMPLE_REPO_GIT_CLONE_URL .
67
+ - install-missing-android-tools :
68
+ inputs :
69
+ - gradlew_path : ./gradlew
42
70
- path::./ :
43
- title : Test simple android project with module and variant set
71
+ title : Android Unit Test (monorepo in source dir, with module and variant set)
44
72
inputs :
45
73
- module : app
46
74
- variant : Debug
75
+ after-run :
76
+ - check-artifacts
47
77
48
78
test-in-root-tmp-dir :
49
79
title : Test android project & mono repo projects in /tmp dir
@@ -64,7 +94,36 @@ workflows:
64
94
inputs :
65
95
- gradlew_path : ./gradlew
66
96
- path::./ :
67
- title : Test simple repo
97
+ title : Android Unit Test (android project & mono repo projects in /tmp dir)
98
+ after-run :
99
+ - check-artifacts
100
+
101
+ test-gradle-kts :
102
+ title : Test android project with build.gradle.kts
103
+ steps :
104
+ - change-workdir :
105
+ title : cd $ORIG_BITRISE_SOURCE_DIR
106
+ inputs :
107
+ - path : $ORIG_BITRISE_SOURCE_DIR
108
+ - script :
109
+ inputs :
110
+ - content : rm -rf $ORIG_BITRISE_SOURCE_DIR/_tmp
111
+ - change-workdir :
112
+ title : cd $ORIG_BITRISE_SOURCE_DIR/_tmp
113
+ inputs :
114
+ - path : ./_tmp
115
+ - is_create_path : true
116
+ - script :
117
+ inputs :
118
+ - content : git clone $SAMPLE_REPO_KOTLIN_GRADLE_URL .
119
+ - install-missing-android-tools :
120
+ inputs :
121
+ - gradlew_path : ./gradlew
122
+ - path::./ :
123
+ title : Android Unit Test (android project with build.gradle.kts)
124
+ after-run :
125
+ - check-artifacts
126
+
68
127
69
128
check-artifacts :
70
129
steps :
@@ -105,6 +164,24 @@ workflows:
105
164
106
165
check-testaddon-export :
107
166
steps :
167
+ - change-workdir :
168
+ title : cd $ORIG_BITRISE_SOURCE_DIR
169
+ inputs :
170
+ - path : $ORIG_BITRISE_SOURCE_DIR
171
+ - script :
172
+ inputs :
173
+ - content : rm -rf $ORIG_BITRISE_SOURCE_DIR/_tmp
174
+ - change-workdir :
175
+ title : cd $ORIG_BITRISE_SOURCE_DIR/_tmp
176
+ inputs :
177
+ - path : ./_tmp
178
+ - is_create_path : true
179
+ - script :
180
+ inputs :
181
+ - content : git clone -b no-failures $SAMPLE_REPO_GIT_CLONE_URL .
182
+ - install-missing-android-tools :
183
+ inputs :
184
+ - gradlew_path : ./gradlew
108
185
- script :
109
186
title : purge previous build artifacts
110
187
inputs :
@@ -134,7 +211,7 @@ workflows:
134
211
135
212
# check result xml existense
136
213
if [ ! $(find ${BITRISE_TEST_DEPLOY_DIR} -regex ".*/app-debug/TEST.*.xml" | grep -c .) -eq 2 ]; then
137
- echo "ERROR: ${BITRISE_TEST_RESULT_DIR}/app-debug does not contain all test result XMLs."
214
+ echo "ERROR: ${BITRISE_TEST_DEPLOY_DIR} does not contain all test result XMLs."
138
215
exit 1
139
216
fi
140
217
0 commit comments