/
.gitlab-ci.yml
65 lines (56 loc) · 1.13 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
56
57
58
59
60
61
62
63
64
stages:
- build
- test
# caching per branch
# To avoid to dl gradle each time
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- .gradle
- build
- config.properties
# caching apt
# To avoid to dl everything each time
cache:
key: "apt-cache"
paths:
- apt-cache
before_script:
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
- apt-get update -yq && apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y openjdk-8-jdk git
# Main build
build:
stage: build
image: ubuntu:16.04
tags:
- docker
script:
- ./gradlew assemble
# Tests
tests:
stage: test
image: ubuntu:16.04
tags:
- docker
dependencies:
- build
script:
- ./gradlew test
artifacts:
paths:
# Tests coverage report
- build/reports/jacoco/merge/html/index.html
# Unit test result
- build/reports/tests/test/index.html
expire_in: 8d
except:
- master
#selenium:
# stage: test
# image: selenium/standalone-firefox
# tags:
# - docker
# script:
# - "sudo apt-get update"
# - "sudo apt-get -y install openjdk-8-jdk"
# - ./gradlew selenium