-
Notifications
You must be signed in to change notification settings - Fork 1
/
.sun-ci.yml
66 lines (63 loc) · 2.15 KB
/
.sun-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
workspace: true
stages:
- ktlint
- detekt
jobs:
- name: Ktlint checking
stage: ktlint
image: amazoncorretto:17.0.10
cache:
- key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
paths:
- ./gradle
before_script:
- chmod +x ./gradlew
- echo "failed (pray)(sweat);(" > .build_status
- echo "(devil)" > .build_icon
script:
- ./gradlew ktlintCheck --daemon
- status1=$?
- if [[ "$status1" = 0 ]] ; then
- echo "*******************************************************"
- echo " Ktlint runs successfully " > .build_status
- echo " (handshake) " > .build_icon
- echo "*******************************************************"
- else
- echo "*******************************************************"
- echo " Ktlint failed "
- echo " Please fix the reported issues before commit. "
- echo "*******************************************************"
- exit status1
- fi
only:
branches:
- develop
- main
- master
events:
- pull_request
- name: Detekt checking
stage: detekt
image: amazoncorretto:17.0.10
script:
- ./gradlew detekt --daemon
- status2=$?
- if [[ "$status2" = 0 ]] ; then
- echo "*******************************************************"
- echo " Detekt runs successfully " > .build_status
- echo " (handshake) " > .build_icon
- echo "*******************************************************"
- else
- echo "*******************************************************"
- echo " Detekt failed "
- echo " Please fix the reported issues before commit. "
- echo "*******************************************************"
- exit status2
- fi
only:
branches:
- develop
- main
- master
events:
- pull_request