-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
72 lines (65 loc) · 1.54 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
65
66
67
68
69
70
71
stages:
- check
- danger
.default:
tags:
- android
only:
- merge_requests
.gradle:
extends: .default
image: androidsdk/android-30
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.unsafe.watch-fs=false"
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
after_script:
- ./prepare_cache.sh
cache:
key: ${CI_PROJECT_ID}
policy: pull-push
paths:
- .gradle/wrapper
- .gradle/caches/modules-2
- .gradle/caches/build-cache-1
.ruby:
extends: .default
image: ruby:2.7-alpine
cache:
key: ${CI_PROJECT_ID}-ruby
paths:
- vendor
before_script:
- apk --no-cache add make g++ git
- gem install bundler
- bundle config set path 'vendor'
- bundle install -j $(nproc)
after_script:
- bundle clean --force
###############################################################################
# Check
###############################################################################
check:
extends: .gradle
stage: check
interruptible: true
script:
- ./gradlew detektDebug app:lintDebug testDebug
- touch build/reports/success
artifacts:
when: always
expire_in: 1 hour
paths:
- build/reports/*
allow_failure: true
###############################################################################
# Danger
###############################################################################
danger:
extends: .ruby
stage: danger
interruptible: true
script:
- bundle exec danger --fail-on-errors=true
only:
- merge_requests