forked from sevntu-checkstyle/sevntu.checkstyle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
116 lines (100 loc) · 2.78 KB
/
.travis.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
language: java
sudo: false
cache:
directories:
- ~/.m2
addons:
apt:
packages:
- xmlstarlet
branches:
only:
- master
install:
-
matrix:
fast_finish: true
include:
# eclipse-cs
- jdk: openjdk8
env:
- DESC="eclipse-cs"
- USE_MAVEN_REPO="true"
- CMD="./.ci/travis.sh eclipse-cs"
# idea-extension
- jdk: openjdk8
env:
- DESC="idea-extension"
- USE_MAVEN_REPO="true"
- CMD="./.ci/travis.sh idea-extension"
# sonar-plugin
- jdk: openjdk8
env:
- DESC="sonar-plugin"
- USE_MAVEN_REPO="true"
- CMD="./.ci/travis.sh sonar-plugin"
# checks
- jdk: openjdk8
env:
- DESC="checks"
- USE_MAVEN_REPO="true"
- CMD="./.ci/travis.sh sevntu-checks"
# Ensure that all sevntu checks are used in contribution
- jdk: openjdk8
env:
- DESC="All sevntu checks should be used in contribution"
- CMD="./.ci/travis.sh all-sevntu-checks-contribution"
# regression on checkstyle
- jdk: openjdk8
env:
- DESC="checkstyle-regression"
- USE_MAVEN_REPO="true"
- CMD="./.ci/travis.sh checkstyle-regression"
# eclipse static analysis
- jdk: openjdk8
env:
- DESC="eclipse-analysis"
- USE_MAVEN_REPO="true"
- CMD="./.ci/travis.sh eclipse-analysis"
# testing of PR format
- env:
- DESC="test Issue ref in PR description"
- CMD="./.ci/travis.sh pr-description"
# https://sonarcloud.io (openjdk8)
- jdk: openjdk8
env:
- DESC="sonarcloud.io"
- USE_MAVEN_REPO="true"
- CMD="./.ci/travis.sh sonarqube"
script:
- SKIP_FILES1=".github|codeship-*|buddy.yml|appveyor.yml|circleci|distelli-manifest.yml"
- SKIP_FILES2="|fast-forward-merge.sh|LICENSE|LICENSE.apache20|README.md|release.sh|RIGHTS.antlr"
- SKIP_FILES3="|shippable.yml|shippable.sh|wercker.yml|wercker.sh|intellij-idea-inspections.xml"
- SKIP_FILES=$SKIP_FILES1$SKIP_FILES2$SKIP_FILES3
- export RUN_JOB=1
- |
set -e
if [[ $RUN_JOB == 1 ]]; then
MVN_SETTINGS=${TRAVIS_HOME}/.m2/settings.xml
if [[ -f ${MVN_SETTINGS} ]]; then
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
sed -i'' -e "/<mirrors>/,/<\/mirrors>/ d" $MVN_SETTINGS
else
xmlstarlet ed --inplace -d "//mirrors" $MVN_SETTINGS
fi
fi
if [[ $USE_MAVEN_REPO == 'true' && ! -d "~/.m2" ]]; then
echo "Maven local repo cache is not found, initializing it ..."
cd sevntu-checks
mvn -B install -Pno-validations
cd ../
fi
echo "eval of CMD is starting";
echo "CMD=$CMD";
eval $CMD;
echo "eval of CMD is completed";
else
echo "CI is skipped";
fi
sleep 5s
after_success: