-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
55 lines (50 loc) · 1.38 KB
/
.gitlab-ci.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
image: jangrewe/gitlab-ci-android:latest
variables:
#Change it to SCREENSHOT or ESPRESSO
REPORT_TYPE: $SCREENSHOT
#
#DO NOT MODIFY THESE VALUES
#
ROOT_PATH: "/Users/testlab/testlab"
SUB_TOKEN: "EpCPqziF"
BUILDS_PATH: "$ROOT_PATH/builds/$SUB_TOKEN/0/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME"
TESTLAB_RUNNER_PATH: "$ROOT_PATH/jar/TestlabRunner.jar"
SPOON_RUNNER_PATH: "$ROOT_PATH/jar/libs/SpoonRunner.jar"
SCREENSHOT: "pdf" #use it for screenshot tests
ESPRESSO: "html" #use it for espresso testing
cache:
policy: pull
key: ${CI_PROJECT_ID}
paths:
- .gradle/
stages:
- build
- test
assemble:
when: manual
allow_failure: false
stage: build
tags:
- androidRunner
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew
script:
- ./gradlew assemble
- ./gradlew assembleAndroidTest
artifacts:
paths:
- app/build/outputs/apk
install:
variables:
GIT_STRATEGY: none
stage: test
dependencies:
- assemble
tags:
- testlabRunner
script:
- java -jar $TESTLAB_RUNNER_PATH --apk "$BUILDS_PATH/app/build/outputs/apk/debug/app-debug.apk" --debugApk "$BUILDS_PATH/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk" --outputFolderPath "$BUILDS_PATH/outputs/" --spoonRunnerPath "$SPOON_RUNNER_PATH" --api "0" --report "$REPORT_TYPE"
artifacts:
paths:
- $BUILDS_PATH/outputs